mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-3f0e0e18ca117418/out/
ardupilotmega.rs

1#![doc = "MAVLink ardupilotmega dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#![allow(clippy::match_single_binding)]
6#[cfg(feature = "arbitrary")]
7use arbitrary::Arbitrary;
8#[allow(unused_imports)]
9use bitflags::{bitflags, Flags};
10#[allow(unused_imports)]
11use mavlink_core::{
12    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
13};
14#[allow(unused_imports)]
15use num_derive::{FromPrimitive, ToPrimitive};
16#[allow(unused_imports)]
17use num_traits::{FromPrimitive, ToPrimitive};
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23pub const DIALECT_NUMBER: u8 = 2u8;
24#[cfg_attr(feature = "ts", derive(TS))]
25#[cfg_attr(feature = "ts", ts(export))]
26#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
27#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28#[cfg_attr(feature = "serde", serde(tag = "type"))]
29#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30#[repr(u32)]
31pub enum AccelcalVehiclePos {
32    ACCELCAL_VEHICLE_POS_LEVEL = 1,
33    ACCELCAL_VEHICLE_POS_LEFT = 2,
34    ACCELCAL_VEHICLE_POS_RIGHT = 3,
35    ACCELCAL_VEHICLE_POS_NOSEDOWN = 4,
36    ACCELCAL_VEHICLE_POS_NOSEUP = 5,
37    ACCELCAL_VEHICLE_POS_BACK = 6,
38    ACCELCAL_VEHICLE_POS_SUCCESS = 16777215,
39    ACCELCAL_VEHICLE_POS_FAILED = 16777216,
40}
41impl AccelcalVehiclePos {
42    pub const DEFAULT: Self = Self::ACCELCAL_VEHICLE_POS_LEVEL;
43}
44impl Default for AccelcalVehiclePos {
45    fn default() -> Self {
46        Self::DEFAULT
47    }
48}
49#[cfg_attr(feature = "ts", derive(TS))]
50#[cfg_attr(feature = "ts", ts(export))]
51#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
52#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
53#[cfg_attr(feature = "serde", serde(tag = "type"))]
54#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
55#[repr(u32)]
56#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
57pub enum ActuatorConfiguration {
58    #[doc = "Do nothing."]
59    ACTUATOR_CONFIGURATION_NONE = 0,
60    #[doc = "Command the actuator to beep now."]
61    ACTUATOR_CONFIGURATION_BEEP = 1,
62    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
63    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
64    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
65    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
66    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
67    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
68    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
69    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
70}
71impl ActuatorConfiguration {
72    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
73}
74impl Default for ActuatorConfiguration {
75    fn default() -> Self {
76        Self::DEFAULT
77    }
78}
79#[cfg_attr(feature = "ts", derive(TS))]
80#[cfg_attr(feature = "ts", ts(export))]
81#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
82#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
83#[cfg_attr(feature = "serde", serde(tag = "type"))]
84#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
85#[repr(u32)]
86#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
87pub enum ActuatorOutputFunction {
88    #[doc = "No function (disabled)."]
89    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
90    #[doc = "Motor 1"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
92    #[doc = "Motor 2"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
94    #[doc = "Motor 3"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
96    #[doc = "Motor 4"]
97    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
98    #[doc = "Motor 5"]
99    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
100    #[doc = "Motor 6"]
101    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
102    #[doc = "Motor 7"]
103    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
104    #[doc = "Motor 8"]
105    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
106    #[doc = "Motor 9"]
107    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
108    #[doc = "Motor 10"]
109    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
110    #[doc = "Motor 11"]
111    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
112    #[doc = "Motor 12"]
113    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
114    #[doc = "Motor 13"]
115    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
116    #[doc = "Motor 14"]
117    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
118    #[doc = "Motor 15"]
119    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
120    #[doc = "Motor 16"]
121    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
122    #[doc = "Servo 1"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
124    #[doc = "Servo 2"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
126    #[doc = "Servo 3"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
128    #[doc = "Servo 4"]
129    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
130    #[doc = "Servo 5"]
131    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
132    #[doc = "Servo 6"]
133    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
134    #[doc = "Servo 7"]
135    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
136    #[doc = "Servo 8"]
137    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
138    #[doc = "Servo 9"]
139    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
140    #[doc = "Servo 10"]
141    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
142    #[doc = "Servo 11"]
143    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
144    #[doc = "Servo 12"]
145    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
146    #[doc = "Servo 13"]
147    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
148    #[doc = "Servo 14"]
149    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
150    #[doc = "Servo 15"]
151    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
152    #[doc = "Servo 16"]
153    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
154}
155impl ActuatorOutputFunction {
156    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
157}
158impl Default for ActuatorOutputFunction {
159    fn default() -> Self {
160        Self::DEFAULT
161    }
162}
163#[cfg_attr(feature = "ts", derive(TS))]
164#[cfg_attr(feature = "ts", ts(export))]
165#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
167#[cfg_attr(feature = "serde", serde(tag = "type"))]
168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
169#[repr(u32)]
170#[doc = "Enumeration of the ADSB altimeter types"]
171pub enum AdsbAltitudeType {
172    #[doc = "Altitude reported from a Baro source using QNH reference"]
173    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
174    #[doc = "Altitude reported from a GNSS source"]
175    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
176}
177impl AdsbAltitudeType {
178    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
179}
180impl Default for AdsbAltitudeType {
181    fn default() -> Self {
182        Self::DEFAULT
183    }
184}
185#[cfg_attr(feature = "ts", derive(TS))]
186#[cfg_attr(feature = "ts", ts(export))]
187#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
189#[cfg_attr(feature = "serde", serde(tag = "type"))]
190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
191#[repr(u32)]
192#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
193pub enum AdsbEmitterType {
194    ADSB_EMITTER_TYPE_NO_INFO = 0,
195    ADSB_EMITTER_TYPE_LIGHT = 1,
196    ADSB_EMITTER_TYPE_SMALL = 2,
197    ADSB_EMITTER_TYPE_LARGE = 3,
198    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
199    ADSB_EMITTER_TYPE_HEAVY = 5,
200    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
201    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
202    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
203    ADSB_EMITTER_TYPE_GLIDER = 9,
204    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
205    ADSB_EMITTER_TYPE_PARACHUTE = 11,
206    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
207    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
208    ADSB_EMITTER_TYPE_UAV = 14,
209    ADSB_EMITTER_TYPE_SPACE = 15,
210    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
211    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
212    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
213    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
214}
215impl AdsbEmitterType {
216    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
217}
218impl Default for AdsbEmitterType {
219    fn default() -> Self {
220        Self::DEFAULT
221    }
222}
223bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
224impl AdsbFlags {
225    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
226}
227impl Default for AdsbFlags {
228    fn default() -> Self {
229        Self::DEFAULT
230    }
231}
232#[cfg_attr(feature = "ts", derive(TS))]
233#[cfg_attr(feature = "ts", ts(export))]
234#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
235#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
236#[cfg_attr(feature = "serde", serde(tag = "type"))]
237#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
238#[repr(u32)]
239pub enum AirlinkAuthResponseType {
240    #[doc = "Login or password error"]
241    AIRLINK_ERROR_LOGIN_OR_PASS = 0,
242    #[doc = "Auth successful"]
243    AIRLINK_AUTH_OK = 1,
244}
245impl AirlinkAuthResponseType {
246    pub const DEFAULT: Self = Self::AIRLINK_ERROR_LOGIN_OR_PASS;
247}
248impl Default for AirlinkAuthResponseType {
249    fn default() -> Self {
250        Self::DEFAULT
251    }
252}
253bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
254impl AisFlags {
255    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
256}
257impl Default for AisFlags {
258    fn default() -> Self {
259        Self::DEFAULT
260    }
261}
262#[cfg_attr(feature = "ts", derive(TS))]
263#[cfg_attr(feature = "ts", ts(export))]
264#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
266#[cfg_attr(feature = "serde", serde(tag = "type"))]
267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
268#[repr(u32)]
269#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
270pub enum AisNavStatus {
271    #[doc = "Under way using engine."]
272    UNDER_WAY = 0,
273    AIS_NAV_ANCHORED = 1,
274    AIS_NAV_UN_COMMANDED = 2,
275    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
276    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
277    AIS_NAV_MOORED = 5,
278    AIS_NAV_AGROUND = 6,
279    AIS_NAV_FISHING = 7,
280    AIS_NAV_SAILING = 8,
281    AIS_NAV_RESERVED_HSC = 9,
282    AIS_NAV_RESERVED_WIG = 10,
283    AIS_NAV_RESERVED_1 = 11,
284    AIS_NAV_RESERVED_2 = 12,
285    AIS_NAV_RESERVED_3 = 13,
286    #[doc = "Search And Rescue Transponder."]
287    AIS_NAV_AIS_SART = 14,
288    #[doc = "Not available (default)."]
289    AIS_NAV_UNKNOWN = 15,
290}
291impl AisNavStatus {
292    pub const DEFAULT: Self = Self::UNDER_WAY;
293}
294impl Default for AisNavStatus {
295    fn default() -> Self {
296        Self::DEFAULT
297    }
298}
299#[cfg_attr(feature = "ts", derive(TS))]
300#[cfg_attr(feature = "ts", ts(export))]
301#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
302#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
303#[cfg_attr(feature = "serde", serde(tag = "type"))]
304#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
305#[repr(u32)]
306#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
307pub enum AisType {
308    #[doc = "Not available (default)."]
309    AIS_TYPE_UNKNOWN = 0,
310    AIS_TYPE_RESERVED_1 = 1,
311    AIS_TYPE_RESERVED_2 = 2,
312    AIS_TYPE_RESERVED_3 = 3,
313    AIS_TYPE_RESERVED_4 = 4,
314    AIS_TYPE_RESERVED_5 = 5,
315    AIS_TYPE_RESERVED_6 = 6,
316    AIS_TYPE_RESERVED_7 = 7,
317    AIS_TYPE_RESERVED_8 = 8,
318    AIS_TYPE_RESERVED_9 = 9,
319    AIS_TYPE_RESERVED_10 = 10,
320    AIS_TYPE_RESERVED_11 = 11,
321    AIS_TYPE_RESERVED_12 = 12,
322    AIS_TYPE_RESERVED_13 = 13,
323    AIS_TYPE_RESERVED_14 = 14,
324    AIS_TYPE_RESERVED_15 = 15,
325    AIS_TYPE_RESERVED_16 = 16,
326    AIS_TYPE_RESERVED_17 = 17,
327    AIS_TYPE_RESERVED_18 = 18,
328    AIS_TYPE_RESERVED_19 = 19,
329    #[doc = "Wing In Ground effect."]
330    AIS_TYPE_WIG = 20,
331    AIS_TYPE_WIG_HAZARDOUS_A = 21,
332    AIS_TYPE_WIG_HAZARDOUS_B = 22,
333    AIS_TYPE_WIG_HAZARDOUS_C = 23,
334    AIS_TYPE_WIG_HAZARDOUS_D = 24,
335    AIS_TYPE_WIG_RESERVED_1 = 25,
336    AIS_TYPE_WIG_RESERVED_2 = 26,
337    AIS_TYPE_WIG_RESERVED_3 = 27,
338    AIS_TYPE_WIG_RESERVED_4 = 28,
339    AIS_TYPE_WIG_RESERVED_5 = 29,
340    AIS_TYPE_FISHING = 30,
341    AIS_TYPE_TOWING = 31,
342    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
343    AIS_TYPE_TOWING_LARGE = 32,
344    #[doc = "Dredging or other underwater ops."]
345    AIS_TYPE_DREDGING = 33,
346    AIS_TYPE_DIVING = 34,
347    AIS_TYPE_MILITARY = 35,
348    AIS_TYPE_SAILING = 36,
349    AIS_TYPE_PLEASURE = 37,
350    AIS_TYPE_RESERVED_20 = 38,
351    AIS_TYPE_RESERVED_21 = 39,
352    #[doc = "High Speed Craft."]
353    AIS_TYPE_HSC = 40,
354    AIS_TYPE_HSC_HAZARDOUS_A = 41,
355    AIS_TYPE_HSC_HAZARDOUS_B = 42,
356    AIS_TYPE_HSC_HAZARDOUS_C = 43,
357    AIS_TYPE_HSC_HAZARDOUS_D = 44,
358    AIS_TYPE_HSC_RESERVED_1 = 45,
359    AIS_TYPE_HSC_RESERVED_2 = 46,
360    AIS_TYPE_HSC_RESERVED_3 = 47,
361    AIS_TYPE_HSC_RESERVED_4 = 48,
362    AIS_TYPE_HSC_UNKNOWN = 49,
363    AIS_TYPE_PILOT = 50,
364    #[doc = "Search And Rescue vessel."]
365    AIS_TYPE_SAR = 51,
366    AIS_TYPE_TUG = 52,
367    AIS_TYPE_PORT_TENDER = 53,
368    #[doc = "Anti-pollution equipment."]
369    AIS_TYPE_ANTI_POLLUTION = 54,
370    AIS_TYPE_LAW_ENFORCEMENT = 55,
371    AIS_TYPE_SPARE_LOCAL_1 = 56,
372    AIS_TYPE_SPARE_LOCAL_2 = 57,
373    AIS_TYPE_MEDICAL_TRANSPORT = 58,
374    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
375    AIS_TYPE_NONECOMBATANT = 59,
376    AIS_TYPE_PASSENGER = 60,
377    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
378    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
379    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
380    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
381    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
382    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
383    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
384    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
385    AIS_TYPE_PASSENGER_UNKNOWN = 69,
386    AIS_TYPE_CARGO = 70,
387    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
388    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
389    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
390    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
391    AIS_TYPE_CARGO_RESERVED_1 = 75,
392    AIS_TYPE_CARGO_RESERVED_2 = 76,
393    AIS_TYPE_CARGO_RESERVED_3 = 77,
394    AIS_TYPE_CARGO_RESERVED_4 = 78,
395    AIS_TYPE_CARGO_UNKNOWN = 79,
396    AIS_TYPE_TANKER = 80,
397    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
398    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
399    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
400    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
401    AIS_TYPE_TANKER_RESERVED_1 = 85,
402    AIS_TYPE_TANKER_RESERVED_2 = 86,
403    AIS_TYPE_TANKER_RESERVED_3 = 87,
404    AIS_TYPE_TANKER_RESERVED_4 = 88,
405    AIS_TYPE_TANKER_UNKNOWN = 89,
406    AIS_TYPE_OTHER = 90,
407    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
408    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
409    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
410    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
411    AIS_TYPE_OTHER_RESERVED_1 = 95,
412    AIS_TYPE_OTHER_RESERVED_2 = 96,
413    AIS_TYPE_OTHER_RESERVED_3 = 97,
414    AIS_TYPE_OTHER_RESERVED_4 = 98,
415    AIS_TYPE_OTHER_UNKNOWN = 99,
416}
417impl AisType {
418    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
419}
420impl Default for AisType {
421    fn default() -> Self {
422        Self::DEFAULT
423    }
424}
425bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
426impl AttitudeTargetTypemask {
427    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
428}
429impl Default for AttitudeTargetTypemask {
430    fn default() -> Self {
431        Self::DEFAULT
432    }
433}
434#[cfg_attr(feature = "ts", derive(TS))]
435#[cfg_attr(feature = "ts", ts(export))]
436#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
438#[cfg_attr(feature = "serde", serde(tag = "type"))]
439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
440#[repr(u32)]
441#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
442pub enum AutotuneAxis {
443    #[doc = "Autotune roll axis."]
444    AUTOTUNE_AXIS_ROLL = 1,
445    #[doc = "Autotune pitch axis."]
446    AUTOTUNE_AXIS_PITCH = 2,
447    #[doc = "Autotune yaw axis."]
448    AUTOTUNE_AXIS_YAW = 4,
449}
450impl AutotuneAxis {
451    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
452}
453impl Default for AutotuneAxis {
454    fn default() -> Self {
455        Self::DEFAULT
456    }
457}
458bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
459impl CameraCapFlags {
460    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
461}
462impl Default for CameraCapFlags {
463    fn default() -> Self {
464        Self::DEFAULT
465    }
466}
467#[cfg_attr(feature = "ts", derive(TS))]
468#[cfg_attr(feature = "ts", ts(export))]
469#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
471#[cfg_attr(feature = "serde", serde(tag = "type"))]
472#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
473#[repr(u32)]
474pub enum CameraFeedbackFlags {
475    #[doc = "Shooting photos, not video."]
476    CAMERA_FEEDBACK_PHOTO = 0,
477    #[doc = "Shooting video, not stills."]
478    CAMERA_FEEDBACK_VIDEO = 1,
479    #[doc = "Unable to achieve requested exposure (e.g. shutter speed too low)."]
480    CAMERA_FEEDBACK_BADEXPOSURE = 2,
481    #[doc = "Closed loop feedback from camera, we know for sure it has successfully taken a picture."]
482    CAMERA_FEEDBACK_CLOSEDLOOP = 3,
483    #[doc = "Open loop camera, an image trigger has been requested but we can't know for sure it has successfully taken a picture."]
484    CAMERA_FEEDBACK_OPENLOOP = 4,
485}
486impl CameraFeedbackFlags {
487    pub const DEFAULT: Self = Self::CAMERA_FEEDBACK_PHOTO;
488}
489impl Default for CameraFeedbackFlags {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494#[cfg_attr(feature = "ts", derive(TS))]
495#[cfg_attr(feature = "ts", ts(export))]
496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
498#[cfg_attr(feature = "serde", serde(tag = "type"))]
499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
500#[repr(u32)]
501#[doc = "Camera Modes."]
502pub enum CameraMode {
503    #[doc = "Camera is in image/photo capture mode."]
504    CAMERA_MODE_IMAGE = 0,
505    #[doc = "Camera is in video capture mode."]
506    CAMERA_MODE_VIDEO = 1,
507    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
508    CAMERA_MODE_IMAGE_SURVEY = 2,
509}
510impl CameraMode {
511    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
512}
513impl Default for CameraMode {
514    fn default() -> Self {
515        Self::DEFAULT
516    }
517}
518#[cfg_attr(feature = "ts", derive(TS))]
519#[cfg_attr(feature = "ts", ts(export))]
520#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
522#[cfg_attr(feature = "serde", serde(tag = "type"))]
523#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
524#[repr(u32)]
525#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
526pub enum CameraSource {
527    #[doc = "Default camera source."]
528    CAMERA_SOURCE_DEFAULT = 0,
529    #[doc = "RGB camera source."]
530    CAMERA_SOURCE_RGB = 1,
531    #[doc = "IR camera source."]
532    CAMERA_SOURCE_IR = 2,
533    #[doc = "NDVI camera source."]
534    CAMERA_SOURCE_NDVI = 3,
535}
536impl CameraSource {
537    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
538}
539impl Default for CameraSource {
540    fn default() -> Self {
541        Self::DEFAULT
542    }
543}
544#[cfg_attr(feature = "ts", derive(TS))]
545#[cfg_attr(feature = "ts", ts(export))]
546#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
548#[cfg_attr(feature = "serde", serde(tag = "type"))]
549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
550#[repr(u32)]
551pub enum CameraStatusTypes {
552    #[doc = "Camera heartbeat, announce camera component ID at 1Hz."]
553    CAMERA_STATUS_TYPE_HEARTBEAT = 0,
554    #[doc = "Camera image triggered."]
555    CAMERA_STATUS_TYPE_TRIGGER = 1,
556    #[doc = "Camera connection lost."]
557    CAMERA_STATUS_TYPE_DISCONNECT = 2,
558    #[doc = "Camera unknown error."]
559    CAMERA_STATUS_TYPE_ERROR = 3,
560    #[doc = "Camera battery low. Parameter p1 shows reported voltage."]
561    CAMERA_STATUS_TYPE_LOWBATT = 4,
562    #[doc = "Camera storage low. Parameter p1 shows reported shots remaining."]
563    CAMERA_STATUS_TYPE_LOWSTORE = 5,
564    #[doc = "Camera storage low. Parameter p1 shows reported video minutes remaining."]
565    CAMERA_STATUS_TYPE_LOWSTOREV = 6,
566}
567impl CameraStatusTypes {
568    pub const DEFAULT: Self = Self::CAMERA_STATUS_TYPE_HEARTBEAT;
569}
570impl Default for CameraStatusTypes {
571    fn default() -> Self {
572        Self::DEFAULT
573    }
574}
575#[cfg_attr(feature = "ts", derive(TS))]
576#[cfg_attr(feature = "ts", ts(export))]
577#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
579#[cfg_attr(feature = "serde", serde(tag = "type"))]
580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
581#[repr(u32)]
582#[doc = "Camera tracking modes"]
583pub enum CameraTrackingMode {
584    #[doc = "Not tracking"]
585    CAMERA_TRACKING_MODE_NONE = 0,
586    #[doc = "Target is a point"]
587    CAMERA_TRACKING_MODE_POINT = 1,
588    #[doc = "Target is a rectangle"]
589    CAMERA_TRACKING_MODE_RECTANGLE = 2,
590}
591impl CameraTrackingMode {
592    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
593}
594impl Default for CameraTrackingMode {
595    fn default() -> Self {
596        Self::DEFAULT
597    }
598}
599#[cfg_attr(feature = "ts", derive(TS))]
600#[cfg_attr(feature = "ts", ts(export))]
601#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
603#[cfg_attr(feature = "serde", serde(tag = "type"))]
604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
605#[repr(u32)]
606#[doc = "Camera tracking status flags"]
607pub enum CameraTrackingStatusFlags {
608    #[doc = "Camera is not tracking"]
609    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
610    #[doc = "Camera is tracking"]
611    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
612    #[doc = "Camera tracking in error state"]
613    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
614}
615impl CameraTrackingStatusFlags {
616    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
617}
618impl Default for CameraTrackingStatusFlags {
619    fn default() -> Self {
620        Self::DEFAULT
621    }
622}
623bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
624impl CameraTrackingTargetData {
625    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
626}
627impl Default for CameraTrackingTargetData {
628    fn default() -> Self {
629        Self::DEFAULT
630    }
631}
632#[cfg_attr(feature = "ts", derive(TS))]
633#[cfg_attr(feature = "ts", ts(export))]
634#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
636#[cfg_attr(feature = "serde", serde(tag = "type"))]
637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
638#[repr(u32)]
639#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
640pub enum CameraZoomType {
641    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
642    ZOOM_TYPE_STEP = 0,
643    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
644    ZOOM_TYPE_CONTINUOUS = 1,
645    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
646    ZOOM_TYPE_RANGE = 2,
647    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
648    ZOOM_TYPE_FOCAL_LENGTH = 3,
649    #[doc = "Zoom value as horizontal field of view in degrees."]
650    ZOOM_TYPE_HORIZONTAL_FOV = 4,
651}
652impl CameraZoomType {
653    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
654}
655impl Default for CameraZoomType {
656    fn default() -> Self {
657        Self::DEFAULT
658    }
659}
660#[cfg_attr(feature = "ts", derive(TS))]
661#[cfg_attr(feature = "ts", ts(export))]
662#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
664#[cfg_attr(feature = "serde", serde(tag = "type"))]
665#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
666#[repr(u32)]
667pub enum CanFilterOp {
668    CAN_FILTER_REPLACE = 0,
669    CAN_FILTER_ADD = 1,
670    CAN_FILTER_REMOVE = 2,
671}
672impl CanFilterOp {
673    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
674}
675impl Default for CanFilterOp {
676    fn default() -> Self {
677        Self::DEFAULT
678    }
679}
680#[cfg_attr(feature = "ts", derive(TS))]
681#[cfg_attr(feature = "ts", ts(export))]
682#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
683#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
684#[cfg_attr(feature = "serde", serde(tag = "type"))]
685#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
686#[repr(u32)]
687#[doc = "Possible responses from a CELLULAR_CONFIG message."]
688pub enum CellularConfigResponse {
689    #[doc = "Changes accepted."]
690    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
691    #[doc = "Invalid APN."]
692    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
693    #[doc = "Invalid PIN."]
694    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
695    #[doc = "Changes rejected."]
696    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
697    #[doc = "PUK is required to unblock SIM card."]
698    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
699}
700impl CellularConfigResponse {
701    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
702}
703impl Default for CellularConfigResponse {
704    fn default() -> Self {
705        Self::DEFAULT
706    }
707}
708#[cfg_attr(feature = "ts", derive(TS))]
709#[cfg_attr(feature = "ts", ts(export))]
710#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
712#[cfg_attr(feature = "serde", serde(tag = "type"))]
713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
714#[repr(u32)]
715#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
716pub enum CellularNetworkFailedReason {
717    #[doc = "No error"]
718    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
719    #[doc = "Error state is unknown"]
720    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
721    #[doc = "SIM is required for the modem but missing"]
722    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
723    #[doc = "SIM is available, but not usable for connection"]
724    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
725}
726impl CellularNetworkFailedReason {
727    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
728}
729impl Default for CellularNetworkFailedReason {
730    fn default() -> Self {
731        Self::DEFAULT
732    }
733}
734#[cfg_attr(feature = "ts", derive(TS))]
735#[cfg_attr(feature = "ts", ts(export))]
736#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
737#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
738#[cfg_attr(feature = "serde", serde(tag = "type"))]
739#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
740#[repr(u32)]
741#[doc = "Cellular network radio type"]
742pub enum CellularNetworkRadioType {
743    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
744    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
745    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
746    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
747    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
748}
749impl CellularNetworkRadioType {
750    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
751}
752impl Default for CellularNetworkRadioType {
753    fn default() -> Self {
754        Self::DEFAULT
755    }
756}
757#[cfg_attr(feature = "ts", derive(TS))]
758#[cfg_attr(feature = "ts", ts(export))]
759#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
761#[cfg_attr(feature = "serde", serde(tag = "type"))]
762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
763#[repr(u32)]
764#[doc = "These flags encode the cellular network status"]
765pub enum CellularStatusFlag {
766    #[doc = "State unknown or not reportable."]
767    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
768    #[doc = "Modem is unusable"]
769    CELLULAR_STATUS_FLAG_FAILED = 1,
770    #[doc = "Modem is being initialized"]
771    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
772    #[doc = "Modem is locked"]
773    CELLULAR_STATUS_FLAG_LOCKED = 3,
774    #[doc = "Modem is not enabled and is powered down"]
775    CELLULAR_STATUS_FLAG_DISABLED = 4,
776    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
777    CELLULAR_STATUS_FLAG_DISABLING = 5,
778    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
779    CELLULAR_STATUS_FLAG_ENABLING = 6,
780    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
781    CELLULAR_STATUS_FLAG_ENABLED = 7,
782    #[doc = "Modem is searching for a network provider to register"]
783    CELLULAR_STATUS_FLAG_SEARCHING = 8,
784    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
785    CELLULAR_STATUS_FLAG_REGISTERED = 9,
786    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
787    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
788    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
789    CELLULAR_STATUS_FLAG_CONNECTING = 11,
790    #[doc = "One or more packet data bearers is active and connected"]
791    CELLULAR_STATUS_FLAG_CONNECTED = 12,
792}
793impl CellularStatusFlag {
794    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
795}
796impl Default for CellularStatusFlag {
797    fn default() -> Self {
798        Self::DEFAULT
799    }
800}
801#[cfg_attr(feature = "ts", derive(TS))]
802#[cfg_attr(feature = "ts", ts(export))]
803#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
805#[cfg_attr(feature = "serde", serde(tag = "type"))]
806#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
807#[repr(u32)]
808#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
809pub enum CompMetadataType {
810    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
811    COMP_METADATA_TYPE_GENERAL = 0,
812    #[doc = "Parameter meta data."]
813    COMP_METADATA_TYPE_PARAMETER = 1,
814    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
815    COMP_METADATA_TYPE_COMMANDS = 2,
816    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
817    COMP_METADATA_TYPE_PERIPHERALS = 3,
818    #[doc = "Meta data for the events interface."]
819    COMP_METADATA_TYPE_EVENTS = 4,
820    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
821    COMP_METADATA_TYPE_ACTUATORS = 5,
822}
823impl CompMetadataType {
824    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
825}
826impl Default for CompMetadataType {
827    fn default() -> Self {
828        Self::DEFAULT
829    }
830}
831#[cfg_attr(feature = "ts", derive(TS))]
832#[cfg_attr(feature = "ts", ts(export))]
833#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
835#[cfg_attr(feature = "serde", serde(tag = "type"))]
836#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
837#[repr(u32)]
838#[doc = "A mapping of copter flight modes for custom_mode field of heartbeat."]
839pub enum CopterMode {
840    #[doc = "STABILIZE"]
841    COPTER_MODE_STABILIZE = 0,
842    #[doc = "ACRO"]
843    COPTER_MODE_ACRO = 1,
844    #[doc = "ALT HOLD"]
845    COPTER_MODE_ALT_HOLD = 2,
846    #[doc = "AUTO"]
847    COPTER_MODE_AUTO = 3,
848    #[doc = "GUIDED"]
849    COPTER_MODE_GUIDED = 4,
850    #[doc = "LOITER"]
851    COPTER_MODE_LOITER = 5,
852    #[doc = "RTL"]
853    COPTER_MODE_RTL = 6,
854    #[doc = "CIRCLE"]
855    COPTER_MODE_CIRCLE = 7,
856    #[doc = "LAND"]
857    COPTER_MODE_LAND = 9,
858    #[doc = "DRIFT"]
859    COPTER_MODE_DRIFT = 11,
860    #[doc = "SPORT"]
861    COPTER_MODE_SPORT = 13,
862    #[doc = "FLIP"]
863    COPTER_MODE_FLIP = 14,
864    #[doc = "AUTOTUNE"]
865    COPTER_MODE_AUTOTUNE = 15,
866    #[doc = "POSHOLD"]
867    COPTER_MODE_POSHOLD = 16,
868    #[doc = "BRAKE"]
869    COPTER_MODE_BRAKE = 17,
870    #[doc = "THROW"]
871    COPTER_MODE_THROW = 18,
872    #[doc = "AVOID ADSB"]
873    COPTER_MODE_AVOID_ADSB = 19,
874    #[doc = "GUIDED NOGPS"]
875    COPTER_MODE_GUIDED_NOGPS = 20,
876    #[doc = "SMARTRTL"]
877    COPTER_MODE_SMART_RTL = 21,
878    #[doc = "FLOWHOLD"]
879    COPTER_MODE_FLOWHOLD = 22,
880    #[doc = "FOLLOW"]
881    COPTER_MODE_FOLLOW = 23,
882    #[doc = "ZIGZAG"]
883    COPTER_MODE_ZIGZAG = 24,
884    #[doc = "SYSTEMID"]
885    COPTER_MODE_SYSTEMID = 25,
886    #[doc = "AUTOROTATE"]
887    COPTER_MODE_AUTOROTATE = 26,
888    #[doc = "AUTO RTL"]
889    COPTER_MODE_AUTO_RTL = 27,
890    #[doc = "TURTLE"]
891    COPTER_MODE_TURTLE = 28,
892}
893impl CopterMode {
894    pub const DEFAULT: Self = Self::COPTER_MODE_STABILIZE;
895}
896impl Default for CopterMode {
897    fn default() -> Self {
898        Self::DEFAULT
899    }
900}
901#[cfg_attr(feature = "ts", derive(TS))]
902#[cfg_attr(feature = "ts", ts(export))]
903#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
904#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
905#[cfg_attr(feature = "serde", serde(tag = "type"))]
906#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
907#[repr(u32)]
908#[doc = "Deepstall flight stage."]
909pub enum DeepstallStage {
910    #[doc = "Flying to the landing point."]
911    DEEPSTALL_STAGE_FLY_TO_LANDING = 0,
912    #[doc = "Building an estimate of the wind."]
913    DEEPSTALL_STAGE_ESTIMATE_WIND = 1,
914    #[doc = "Waiting to breakout of the loiter to fly the approach."]
915    DEEPSTALL_STAGE_WAIT_FOR_BREAKOUT = 2,
916    #[doc = "Flying to the first arc point to turn around to the landing point."]
917    DEEPSTALL_STAGE_FLY_TO_ARC = 3,
918    #[doc = "Turning around back to the deepstall landing point."]
919    DEEPSTALL_STAGE_ARC = 4,
920    #[doc = "Approaching the landing point."]
921    DEEPSTALL_STAGE_APPROACH = 5,
922    #[doc = "Stalling and steering towards the land point."]
923    DEEPSTALL_STAGE_LAND = 6,
924}
925impl DeepstallStage {
926    pub const DEFAULT: Self = Self::DEEPSTALL_STAGE_FLY_TO_LANDING;
927}
928impl Default for DeepstallStage {
929    fn default() -> Self {
930        Self::DEFAULT
931    }
932}
933#[cfg_attr(feature = "ts", derive(TS))]
934#[cfg_attr(feature = "ts", ts(export))]
935#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
937#[cfg_attr(feature = "serde", serde(tag = "type"))]
938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
939#[repr(u32)]
940#[doc = "Bus types for device operations."]
941pub enum DeviceOpBustype {
942    #[doc = "I2C Device operation."]
943    DEVICE_OP_BUSTYPE_I2C = 0,
944    #[doc = "SPI Device operation."]
945    DEVICE_OP_BUSTYPE_SPI = 1,
946}
947impl DeviceOpBustype {
948    pub const DEFAULT: Self = Self::DEVICE_OP_BUSTYPE_I2C;
949}
950impl Default for DeviceOpBustype {
951    fn default() -> Self {
952        Self::DEFAULT
953    }
954}
955bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in EKF_STATUS message."] pub struct EkfStatusFlags : u16 { # [doc = "Set if EKF's attitude estimate is good."] const EKF_ATTITUDE = 1 ; # [doc = "Set if EKF's horizontal velocity estimate is good."] const EKF_VELOCITY_HORIZ = 2 ; # [doc = "Set if EKF's vertical velocity estimate is good."] const EKF_VELOCITY_VERT = 4 ; # [doc = "Set if EKF's horizontal position (relative) estimate is good."] const EKF_POS_HORIZ_REL = 8 ; # [doc = "Set if EKF's horizontal position (absolute) estimate is good."] const EKF_POS_HORIZ_ABS = 16 ; # [doc = "Set if EKF's vertical position (absolute) estimate is good."] const EKF_POS_VERT_ABS = 32 ; # [doc = "Set if EKF's vertical position (above ground) estimate is good."] const EKF_POS_VERT_AGL = 64 ; # [doc = "EKF is in constant position mode and does not know it's absolute or relative position."] const EKF_CONST_POS_MODE = 128 ; # [doc = "Set if EKF's predicted horizontal position (relative) estimate is good."] const EKF_PRED_POS_HORIZ_REL = 256 ; # [doc = "Set if EKF's predicted horizontal position (absolute) estimate is good."] const EKF_PRED_POS_HORIZ_ABS = 512 ; # [doc = "Set if EKF believes the GPS input data is faulty."] const EKF_GPS_GLITCHING = 32768 ; # [doc = "Set if EKF has never been healthy."] const EKF_UNINITIALIZED = 1024 ; } }
956impl EkfStatusFlags {
957    pub const DEFAULT: Self = Self::EKF_ATTITUDE;
958}
959impl Default for EkfStatusFlags {
960    fn default() -> Self {
961        Self::DEFAULT
962    }
963}
964#[cfg_attr(feature = "ts", derive(TS))]
965#[cfg_attr(feature = "ts", ts(export))]
966#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
967#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
968#[cfg_attr(feature = "serde", serde(tag = "type"))]
969#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
970#[repr(u32)]
971#[doc = "Indicates the ESC connection type."]
972pub enum EscConnectionType {
973    #[doc = "Traditional PPM ESC."]
974    ESC_CONNECTION_TYPE_PPM = 0,
975    #[doc = "Serial Bus connected ESC."]
976    ESC_CONNECTION_TYPE_SERIAL = 1,
977    #[doc = "One Shot PPM ESC."]
978    ESC_CONNECTION_TYPE_ONESHOT = 2,
979    #[doc = "I2C ESC."]
980    ESC_CONNECTION_TYPE_I2C = 3,
981    #[doc = "CAN-Bus ESC."]
982    ESC_CONNECTION_TYPE_CAN = 4,
983    #[doc = "DShot ESC."]
984    ESC_CONNECTION_TYPE_DSHOT = 5,
985}
986impl EscConnectionType {
987    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
988}
989impl Default for EscConnectionType {
990    fn default() -> Self {
991        Self::DEFAULT
992    }
993}
994bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
995impl EscFailureFlags {
996    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
997}
998impl Default for EscFailureFlags {
999    fn default() -> Self {
1000        Self::DEFAULT
1001    }
1002}
1003bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
1004impl EstimatorStatusFlags {
1005    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
1006}
1007impl Default for EstimatorStatusFlags {
1008    fn default() -> Self {
1009        Self::DEFAULT
1010    }
1011}
1012#[cfg_attr(feature = "ts", derive(TS))]
1013#[cfg_attr(feature = "ts", ts(export))]
1014#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1016#[cfg_attr(feature = "serde", serde(tag = "type"))]
1017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1018#[repr(u32)]
1019#[doc = "List of possible failure type to inject."]
1020pub enum FailureType {
1021    #[doc = "No failure injected, used to reset a previous failure."]
1022    FAILURE_TYPE_OK = 0,
1023    #[doc = "Sets unit off, so completely non-responsive."]
1024    FAILURE_TYPE_OFF = 1,
1025    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
1026    FAILURE_TYPE_STUCK = 2,
1027    #[doc = "Unit is reporting complete garbage."]
1028    FAILURE_TYPE_GARBAGE = 3,
1029    #[doc = "Unit is consistently wrong."]
1030    FAILURE_TYPE_WRONG = 4,
1031    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
1032    FAILURE_TYPE_SLOW = 5,
1033    #[doc = "Data of unit is delayed in time."]
1034    FAILURE_TYPE_DELAYED = 6,
1035    #[doc = "Unit is sometimes working, sometimes not."]
1036    FAILURE_TYPE_INTERMITTENT = 7,
1037}
1038impl FailureType {
1039    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
1040}
1041impl Default for FailureType {
1042    fn default() -> Self {
1043        Self::DEFAULT
1044    }
1045}
1046#[cfg_attr(feature = "ts", derive(TS))]
1047#[cfg_attr(feature = "ts", ts(export))]
1048#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1049#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1050#[cfg_attr(feature = "serde", serde(tag = "type"))]
1051#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1052#[repr(u32)]
1053#[doc = "List of possible units where failures can be injected."]
1054pub enum FailureUnit {
1055    FAILURE_UNIT_SENSOR_GYRO = 0,
1056    FAILURE_UNIT_SENSOR_ACCEL = 1,
1057    FAILURE_UNIT_SENSOR_MAG = 2,
1058    FAILURE_UNIT_SENSOR_BARO = 3,
1059    FAILURE_UNIT_SENSOR_GPS = 4,
1060    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
1061    FAILURE_UNIT_SENSOR_VIO = 6,
1062    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
1063    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
1064    FAILURE_UNIT_SYSTEM_BATTERY = 100,
1065    FAILURE_UNIT_SYSTEM_MOTOR = 101,
1066    FAILURE_UNIT_SYSTEM_SERVO = 102,
1067    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
1068    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
1069    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
1070}
1071impl FailureUnit {
1072    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
1073}
1074impl Default for FailureUnit {
1075    fn default() -> Self {
1076        Self::DEFAULT
1077    }
1078}
1079#[cfg_attr(feature = "ts", derive(TS))]
1080#[cfg_attr(feature = "ts", ts(export))]
1081#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1083#[cfg_attr(feature = "serde", serde(tag = "type"))]
1084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1085#[repr(u32)]
1086pub enum FenceBreach {
1087    #[doc = "No last fence breach"]
1088    FENCE_BREACH_NONE = 0,
1089    #[doc = "Breached minimum altitude"]
1090    FENCE_BREACH_MINALT = 1,
1091    #[doc = "Breached maximum altitude"]
1092    FENCE_BREACH_MAXALT = 2,
1093    #[doc = "Breached fence boundary"]
1094    FENCE_BREACH_BOUNDARY = 3,
1095}
1096impl FenceBreach {
1097    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
1098}
1099impl Default for FenceBreach {
1100    fn default() -> Self {
1101        Self::DEFAULT
1102    }
1103}
1104#[cfg_attr(feature = "ts", derive(TS))]
1105#[cfg_attr(feature = "ts", ts(export))]
1106#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1108#[cfg_attr(feature = "serde", serde(tag = "type"))]
1109#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1110#[repr(u32)]
1111#[doc = "Actions being taken to mitigate/prevent fence breach"]
1112pub enum FenceMitigate {
1113    #[doc = "Unknown"]
1114    FENCE_MITIGATE_UNKNOWN = 0,
1115    #[doc = "No actions being taken"]
1116    FENCE_MITIGATE_NONE = 1,
1117    #[doc = "Velocity limiting active to prevent breach"]
1118    FENCE_MITIGATE_VEL_LIMIT = 2,
1119}
1120impl FenceMitigate {
1121    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
1122}
1123impl Default for FenceMitigate {
1124    fn default() -> Self {
1125        Self::DEFAULT
1126    }
1127}
1128#[cfg_attr(feature = "ts", derive(TS))]
1129#[cfg_attr(feature = "ts", ts(export))]
1130#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1132#[cfg_attr(feature = "serde", serde(tag = "type"))]
1133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1134#[repr(u32)]
1135#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
1136pub enum FenceType {
1137    #[doc = "Maximum altitude fence"]
1138    FENCE_TYPE_ALT_MAX = 1,
1139    #[doc = "Circle fence"]
1140    FENCE_TYPE_CIRCLE = 2,
1141    #[doc = "Polygon fence"]
1142    FENCE_TYPE_POLYGON = 4,
1143    #[doc = "Minimum altitude fence"]
1144    FENCE_TYPE_ALT_MIN = 8,
1145}
1146impl FenceType {
1147    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
1148}
1149impl Default for FenceType {
1150    fn default() -> Self {
1151        Self::DEFAULT
1152    }
1153}
1154#[cfg_attr(feature = "ts", derive(TS))]
1155#[cfg_attr(feature = "ts", ts(export))]
1156#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1158#[cfg_attr(feature = "serde", serde(tag = "type"))]
1159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1160#[repr(u32)]
1161#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
1162pub enum FirmwareVersionType {
1163    #[doc = "development release"]
1164    FIRMWARE_VERSION_TYPE_DEV = 0,
1165    #[doc = "alpha release"]
1166    FIRMWARE_VERSION_TYPE_ALPHA = 64,
1167    #[doc = "beta release"]
1168    FIRMWARE_VERSION_TYPE_BETA = 128,
1169    #[doc = "release candidate"]
1170    FIRMWARE_VERSION_TYPE_RC = 192,
1171    #[doc = "official stable release"]
1172    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
1173}
1174impl FirmwareVersionType {
1175    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
1176}
1177impl Default for FirmwareVersionType {
1178    fn default() -> Self {
1179        Self::DEFAULT
1180    }
1181}
1182#[cfg_attr(feature = "ts", derive(TS))]
1183#[cfg_attr(feature = "ts", ts(export))]
1184#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1186#[cfg_attr(feature = "serde", serde(tag = "type"))]
1187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1188#[repr(u32)]
1189pub enum GimbalAxis {
1190    #[doc = "Gimbal yaw axis."]
1191    GIMBAL_AXIS_YAW = 0,
1192    #[doc = "Gimbal pitch axis."]
1193    GIMBAL_AXIS_PITCH = 1,
1194    #[doc = "Gimbal roll axis."]
1195    GIMBAL_AXIS_ROLL = 2,
1196}
1197impl GimbalAxis {
1198    pub const DEFAULT: Self = Self::GIMBAL_AXIS_YAW;
1199}
1200impl Default for GimbalAxis {
1201    fn default() -> Self {
1202        Self::DEFAULT
1203    }
1204}
1205#[cfg_attr(feature = "ts", derive(TS))]
1206#[cfg_attr(feature = "ts", ts(export))]
1207#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1209#[cfg_attr(feature = "serde", serde(tag = "type"))]
1210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1211#[repr(u32)]
1212pub enum GimbalAxisCalibrationRequired {
1213    #[doc = "Whether or not this axis requires calibration is unknown at this time."]
1214    GIMBAL_AXIS_CALIBRATION_REQUIRED_UNKNOWN = 0,
1215    #[doc = "This axis requires calibration."]
1216    GIMBAL_AXIS_CALIBRATION_REQUIRED_TRUE = 1,
1217    #[doc = "This axis does not require calibration."]
1218    GIMBAL_AXIS_CALIBRATION_REQUIRED_FALSE = 2,
1219}
1220impl GimbalAxisCalibrationRequired {
1221    pub const DEFAULT: Self = Self::GIMBAL_AXIS_CALIBRATION_REQUIRED_UNKNOWN;
1222}
1223impl Default for GimbalAxisCalibrationRequired {
1224    fn default() -> Self {
1225        Self::DEFAULT
1226    }
1227}
1228#[cfg_attr(feature = "ts", derive(TS))]
1229#[cfg_attr(feature = "ts", ts(export))]
1230#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1232#[cfg_attr(feature = "serde", serde(tag = "type"))]
1233#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1234#[repr(u32)]
1235pub enum GimbalAxisCalibrationStatus {
1236    #[doc = "Axis calibration is in progress."]
1237    GIMBAL_AXIS_CALIBRATION_STATUS_IN_PROGRESS = 0,
1238    #[doc = "Axis calibration succeeded."]
1239    GIMBAL_AXIS_CALIBRATION_STATUS_SUCCEEDED = 1,
1240    #[doc = "Axis calibration failed."]
1241    GIMBAL_AXIS_CALIBRATION_STATUS_FAILED = 2,
1242}
1243impl GimbalAxisCalibrationStatus {
1244    pub const DEFAULT: Self = Self::GIMBAL_AXIS_CALIBRATION_STATUS_IN_PROGRESS;
1245}
1246impl Default for GimbalAxisCalibrationStatus {
1247    fn default() -> Self {
1248        Self::DEFAULT
1249    }
1250}
1251bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
1252impl GimbalDeviceCapFlags {
1253    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
1254}
1255impl Default for GimbalDeviceCapFlags {
1256    fn default() -> Self {
1257        Self::DEFAULT
1258    }
1259}
1260bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
1261impl GimbalDeviceErrorFlags {
1262    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
1263}
1264impl Default for GimbalDeviceErrorFlags {
1265    fn default() -> Self {
1266        Self::DEFAULT
1267    }
1268}
1269bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
1270impl GimbalDeviceFlags {
1271    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
1272}
1273impl Default for GimbalDeviceFlags {
1274    fn default() -> Self {
1275        Self::DEFAULT
1276    }
1277}
1278bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
1279impl GimbalManagerCapFlags {
1280    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
1281}
1282impl Default for GimbalManagerCapFlags {
1283    fn default() -> Self {
1284        Self::DEFAULT
1285    }
1286}
1287bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
1288impl GimbalManagerFlags {
1289    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
1290}
1291impl Default for GimbalManagerFlags {
1292    fn default() -> Self {
1293        Self::DEFAULT
1294    }
1295}
1296#[cfg_attr(feature = "ts", derive(TS))]
1297#[cfg_attr(feature = "ts", ts(export))]
1298#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1300#[cfg_attr(feature = "serde", serde(tag = "type"))]
1301#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1302#[repr(u32)]
1303pub enum GoproBurstRate {
1304    #[doc = "3 Shots / 1 Second."]
1305    GOPRO_BURST_RATE_3_IN_1_SECOND = 0,
1306    #[doc = "5 Shots / 1 Second."]
1307    GOPRO_BURST_RATE_5_IN_1_SECOND = 1,
1308    #[doc = "10 Shots / 1 Second."]
1309    GOPRO_BURST_RATE_10_IN_1_SECOND = 2,
1310    #[doc = "10 Shots / 2 Second."]
1311    GOPRO_BURST_RATE_10_IN_2_SECOND = 3,
1312    #[doc = "10 Shots / 3 Second (Hero 4 Only)."]
1313    GOPRO_BURST_RATE_10_IN_3_SECOND = 4,
1314    #[doc = "30 Shots / 1 Second."]
1315    GOPRO_BURST_RATE_30_IN_1_SECOND = 5,
1316    #[doc = "30 Shots / 2 Second."]
1317    GOPRO_BURST_RATE_30_IN_2_SECOND = 6,
1318    #[doc = "30 Shots / 3 Second."]
1319    GOPRO_BURST_RATE_30_IN_3_SECOND = 7,
1320    #[doc = "30 Shots / 6 Second."]
1321    GOPRO_BURST_RATE_30_IN_6_SECOND = 8,
1322}
1323impl GoproBurstRate {
1324    pub const DEFAULT: Self = Self::GOPRO_BURST_RATE_3_IN_1_SECOND;
1325}
1326impl Default for GoproBurstRate {
1327    fn default() -> Self {
1328        Self::DEFAULT
1329    }
1330}
1331#[cfg_attr(feature = "ts", derive(TS))]
1332#[cfg_attr(feature = "ts", ts(export))]
1333#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1335#[cfg_attr(feature = "serde", serde(tag = "type"))]
1336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1337#[repr(u32)]
1338pub enum GoproCaptureMode {
1339    #[doc = "Video mode."]
1340    GOPRO_CAPTURE_MODE_VIDEO = 0,
1341    #[doc = "Photo mode."]
1342    GOPRO_CAPTURE_MODE_PHOTO = 1,
1343    #[doc = "Burst mode, Hero 3+ only."]
1344    GOPRO_CAPTURE_MODE_BURST = 2,
1345    #[doc = "Time lapse mode, Hero 3+ only."]
1346    GOPRO_CAPTURE_MODE_TIME_LAPSE = 3,
1347    #[doc = "Multi shot mode, Hero 4 only."]
1348    GOPRO_CAPTURE_MODE_MULTI_SHOT = 4,
1349    #[doc = "Playback mode, Hero 4 only, silver only except when LCD or HDMI is connected to black."]
1350    GOPRO_CAPTURE_MODE_PLAYBACK = 5,
1351    #[doc = "Playback mode, Hero 4 only."]
1352    GOPRO_CAPTURE_MODE_SETUP = 6,
1353    #[doc = "Mode not yet known."]
1354    GOPRO_CAPTURE_MODE_UNKNOWN = 255,
1355}
1356impl GoproCaptureMode {
1357    pub const DEFAULT: Self = Self::GOPRO_CAPTURE_MODE_VIDEO;
1358}
1359impl Default for GoproCaptureMode {
1360    fn default() -> Self {
1361        Self::DEFAULT
1362    }
1363}
1364#[cfg_attr(feature = "ts", derive(TS))]
1365#[cfg_attr(feature = "ts", ts(export))]
1366#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1367#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1368#[cfg_attr(feature = "serde", serde(tag = "type"))]
1369#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1370#[repr(u32)]
1371pub enum GoproCharging {
1372    #[doc = "Charging disabled."]
1373    GOPRO_CHARGING_DISABLED = 0,
1374    #[doc = "Charging enabled."]
1375    GOPRO_CHARGING_ENABLED = 1,
1376}
1377impl GoproCharging {
1378    pub const DEFAULT: Self = Self::GOPRO_CHARGING_DISABLED;
1379}
1380impl Default for GoproCharging {
1381    fn default() -> Self {
1382        Self::DEFAULT
1383    }
1384}
1385#[cfg_attr(feature = "ts", derive(TS))]
1386#[cfg_attr(feature = "ts", ts(export))]
1387#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1389#[cfg_attr(feature = "serde", serde(tag = "type"))]
1390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1391#[repr(u32)]
1392pub enum GoproCommand {
1393    #[doc = "(Get/Set)."]
1394    GOPRO_COMMAND_POWER = 0,
1395    #[doc = "(Get/Set)."]
1396    GOPRO_COMMAND_CAPTURE_MODE = 1,
1397    #[doc = "(___/Set)."]
1398    GOPRO_COMMAND_SHUTTER = 2,
1399    #[doc = "(Get/___)."]
1400    GOPRO_COMMAND_BATTERY = 3,
1401    #[doc = "(Get/___)."]
1402    GOPRO_COMMAND_MODEL = 4,
1403    #[doc = "(Get/Set)."]
1404    GOPRO_COMMAND_VIDEO_SETTINGS = 5,
1405    #[doc = "(Get/Set)."]
1406    GOPRO_COMMAND_LOW_LIGHT = 6,
1407    #[doc = "(Get/Set)."]
1408    GOPRO_COMMAND_PHOTO_RESOLUTION = 7,
1409    #[doc = "(Get/Set)."]
1410    GOPRO_COMMAND_PHOTO_BURST_RATE = 8,
1411    #[doc = "(Get/Set)."]
1412    GOPRO_COMMAND_PROTUNE = 9,
1413    #[doc = "(Get/Set) Hero 3+ Only."]
1414    GOPRO_COMMAND_PROTUNE_WHITE_BALANCE = 10,
1415    #[doc = "(Get/Set) Hero 3+ Only."]
1416    GOPRO_COMMAND_PROTUNE_COLOUR = 11,
1417    #[doc = "(Get/Set) Hero 3+ Only."]
1418    GOPRO_COMMAND_PROTUNE_GAIN = 12,
1419    #[doc = "(Get/Set) Hero 3+ Only."]
1420    GOPRO_COMMAND_PROTUNE_SHARPNESS = 13,
1421    #[doc = "(Get/Set) Hero 3+ Only."]
1422    GOPRO_COMMAND_PROTUNE_EXPOSURE = 14,
1423    #[doc = "(Get/Set)."]
1424    GOPRO_COMMAND_TIME = 15,
1425    #[doc = "(Get/Set)."]
1426    GOPRO_COMMAND_CHARGING = 16,
1427}
1428impl GoproCommand {
1429    pub const DEFAULT: Self = Self::GOPRO_COMMAND_POWER;
1430}
1431impl Default for GoproCommand {
1432    fn default() -> Self {
1433        Self::DEFAULT
1434    }
1435}
1436#[cfg_attr(feature = "ts", derive(TS))]
1437#[cfg_attr(feature = "ts", ts(export))]
1438#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1439#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1440#[cfg_attr(feature = "serde", serde(tag = "type"))]
1441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1442#[repr(u32)]
1443pub enum GoproFieldOfView {
1444    #[doc = "0x00: Wide."]
1445    GOPRO_FIELD_OF_VIEW_WIDE = 0,
1446    #[doc = "0x01: Medium."]
1447    GOPRO_FIELD_OF_VIEW_MEDIUM = 1,
1448    #[doc = "0x02: Narrow."]
1449    GOPRO_FIELD_OF_VIEW_NARROW = 2,
1450}
1451impl GoproFieldOfView {
1452    pub const DEFAULT: Self = Self::GOPRO_FIELD_OF_VIEW_WIDE;
1453}
1454impl Default for GoproFieldOfView {
1455    fn default() -> Self {
1456        Self::DEFAULT
1457    }
1458}
1459#[cfg_attr(feature = "ts", derive(TS))]
1460#[cfg_attr(feature = "ts", ts(export))]
1461#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1463#[cfg_attr(feature = "serde", serde(tag = "type"))]
1464#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1465#[repr(u32)]
1466pub enum GoproFrameRate {
1467    #[doc = "12 FPS."]
1468    GOPRO_FRAME_RATE_12 = 0,
1469    #[doc = "15 FPS."]
1470    GOPRO_FRAME_RATE_15 = 1,
1471    #[doc = "24 FPS."]
1472    GOPRO_FRAME_RATE_24 = 2,
1473    #[doc = "25 FPS."]
1474    GOPRO_FRAME_RATE_25 = 3,
1475    #[doc = "30 FPS."]
1476    GOPRO_FRAME_RATE_30 = 4,
1477    #[doc = "48 FPS."]
1478    GOPRO_FRAME_RATE_48 = 5,
1479    #[doc = "50 FPS."]
1480    GOPRO_FRAME_RATE_50 = 6,
1481    #[doc = "60 FPS."]
1482    GOPRO_FRAME_RATE_60 = 7,
1483    #[doc = "80 FPS."]
1484    GOPRO_FRAME_RATE_80 = 8,
1485    #[doc = "90 FPS."]
1486    GOPRO_FRAME_RATE_90 = 9,
1487    #[doc = "100 FPS."]
1488    GOPRO_FRAME_RATE_100 = 10,
1489    #[doc = "120 FPS."]
1490    GOPRO_FRAME_RATE_120 = 11,
1491    #[doc = "240 FPS."]
1492    GOPRO_FRAME_RATE_240 = 12,
1493    #[doc = "12.5 FPS."]
1494    GOPRO_FRAME_RATE_12_5 = 13,
1495}
1496impl GoproFrameRate {
1497    pub const DEFAULT: Self = Self::GOPRO_FRAME_RATE_12;
1498}
1499impl Default for GoproFrameRate {
1500    fn default() -> Self {
1501        Self::DEFAULT
1502    }
1503}
1504bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GoproHeartbeatFlags : u8 { # [doc = "GoPro is currently recording."] const GOPRO_FLAG_RECORDING = 1 ; } }
1505impl GoproHeartbeatFlags {
1506    pub const DEFAULT: Self = Self::GOPRO_FLAG_RECORDING;
1507}
1508impl Default for GoproHeartbeatFlags {
1509    fn default() -> Self {
1510        Self::DEFAULT
1511    }
1512}
1513#[cfg_attr(feature = "ts", derive(TS))]
1514#[cfg_attr(feature = "ts", ts(export))]
1515#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1517#[cfg_attr(feature = "serde", serde(tag = "type"))]
1518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1519#[repr(u32)]
1520pub enum GoproHeartbeatStatus {
1521    #[doc = "No GoPro connected."]
1522    GOPRO_HEARTBEAT_STATUS_DISCONNECTED = 0,
1523    #[doc = "The detected GoPro is not HeroBus compatible."]
1524    GOPRO_HEARTBEAT_STATUS_INCOMPATIBLE = 1,
1525    #[doc = "A HeroBus compatible GoPro is connected."]
1526    GOPRO_HEARTBEAT_STATUS_CONNECTED = 2,
1527    #[doc = "An unrecoverable error was encountered with the connected GoPro, it may require a power cycle."]
1528    GOPRO_HEARTBEAT_STATUS_ERROR = 3,
1529}
1530impl GoproHeartbeatStatus {
1531    pub const DEFAULT: Self = Self::GOPRO_HEARTBEAT_STATUS_DISCONNECTED;
1532}
1533impl Default for GoproHeartbeatStatus {
1534    fn default() -> Self {
1535        Self::DEFAULT
1536    }
1537}
1538#[cfg_attr(feature = "ts", derive(TS))]
1539#[cfg_attr(feature = "ts", ts(export))]
1540#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1541#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1542#[cfg_attr(feature = "serde", serde(tag = "type"))]
1543#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1544#[repr(u32)]
1545pub enum GoproModel {
1546    #[doc = "Unknown gopro model."]
1547    GOPRO_MODEL_UNKNOWN = 0,
1548    #[doc = "Hero 3+ Silver (HeroBus not supported by GoPro)."]
1549    GOPRO_MODEL_HERO_3_PLUS_SILVER = 1,
1550    #[doc = "Hero 3+ Black."]
1551    GOPRO_MODEL_HERO_3_PLUS_BLACK = 2,
1552    #[doc = "Hero 4 Silver."]
1553    GOPRO_MODEL_HERO_4_SILVER = 3,
1554    #[doc = "Hero 4 Black."]
1555    GOPRO_MODEL_HERO_4_BLACK = 4,
1556}
1557impl GoproModel {
1558    pub const DEFAULT: Self = Self::GOPRO_MODEL_UNKNOWN;
1559}
1560impl Default for GoproModel {
1561    fn default() -> Self {
1562        Self::DEFAULT
1563    }
1564}
1565#[cfg_attr(feature = "ts", derive(TS))]
1566#[cfg_attr(feature = "ts", ts(export))]
1567#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1569#[cfg_attr(feature = "serde", serde(tag = "type"))]
1570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1571#[repr(u32)]
1572pub enum GoproPhotoResolution {
1573    #[doc = "5MP Medium."]
1574    GOPRO_PHOTO_RESOLUTION_5MP_MEDIUM = 0,
1575    #[doc = "7MP Medium."]
1576    GOPRO_PHOTO_RESOLUTION_7MP_MEDIUM = 1,
1577    #[doc = "7MP Wide."]
1578    GOPRO_PHOTO_RESOLUTION_7MP_WIDE = 2,
1579    #[doc = "10MP Wide."]
1580    GOPRO_PHOTO_RESOLUTION_10MP_WIDE = 3,
1581    #[doc = "12MP Wide."]
1582    GOPRO_PHOTO_RESOLUTION_12MP_WIDE = 4,
1583}
1584impl GoproPhotoResolution {
1585    pub const DEFAULT: Self = Self::GOPRO_PHOTO_RESOLUTION_5MP_MEDIUM;
1586}
1587impl Default for GoproPhotoResolution {
1588    fn default() -> Self {
1589        Self::DEFAULT
1590    }
1591}
1592#[cfg_attr(feature = "ts", derive(TS))]
1593#[cfg_attr(feature = "ts", ts(export))]
1594#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1596#[cfg_attr(feature = "serde", serde(tag = "type"))]
1597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1598#[repr(u32)]
1599pub enum GoproProtuneColour {
1600    #[doc = "Auto."]
1601    GOPRO_PROTUNE_COLOUR_STANDARD = 0,
1602    #[doc = "Neutral."]
1603    GOPRO_PROTUNE_COLOUR_NEUTRAL = 1,
1604}
1605impl GoproProtuneColour {
1606    pub const DEFAULT: Self = Self::GOPRO_PROTUNE_COLOUR_STANDARD;
1607}
1608impl Default for GoproProtuneColour {
1609    fn default() -> Self {
1610        Self::DEFAULT
1611    }
1612}
1613#[cfg_attr(feature = "ts", derive(TS))]
1614#[cfg_attr(feature = "ts", ts(export))]
1615#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1617#[cfg_attr(feature = "serde", serde(tag = "type"))]
1618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1619#[repr(u32)]
1620pub enum GoproProtuneExposure {
1621    #[doc = "-5.0 EV (Hero 3+ Only)."]
1622    GOPRO_PROTUNE_EXPOSURE_NEG_5_0 = 0,
1623    #[doc = "-4.5 EV (Hero 3+ Only)."]
1624    GOPRO_PROTUNE_EXPOSURE_NEG_4_5 = 1,
1625    #[doc = "-4.0 EV (Hero 3+ Only)."]
1626    GOPRO_PROTUNE_EXPOSURE_NEG_4_0 = 2,
1627    #[doc = "-3.5 EV (Hero 3+ Only)."]
1628    GOPRO_PROTUNE_EXPOSURE_NEG_3_5 = 3,
1629    #[doc = "-3.0 EV (Hero 3+ Only)."]
1630    GOPRO_PROTUNE_EXPOSURE_NEG_3_0 = 4,
1631    #[doc = "-2.5 EV (Hero 3+ Only)."]
1632    GOPRO_PROTUNE_EXPOSURE_NEG_2_5 = 5,
1633    #[doc = "-2.0 EV."]
1634    GOPRO_PROTUNE_EXPOSURE_NEG_2_0 = 6,
1635    #[doc = "-1.5 EV."]
1636    GOPRO_PROTUNE_EXPOSURE_NEG_1_5 = 7,
1637    #[doc = "-1.0 EV."]
1638    GOPRO_PROTUNE_EXPOSURE_NEG_1_0 = 8,
1639    #[doc = "-0.5 EV."]
1640    GOPRO_PROTUNE_EXPOSURE_NEG_0_5 = 9,
1641    #[doc = "0.0 EV."]
1642    GOPRO_PROTUNE_EXPOSURE_ZERO = 10,
1643    #[doc = "+0.5 EV."]
1644    GOPRO_PROTUNE_EXPOSURE_POS_0_5 = 11,
1645    #[doc = "+1.0 EV."]
1646    GOPRO_PROTUNE_EXPOSURE_POS_1_0 = 12,
1647    #[doc = "+1.5 EV."]
1648    GOPRO_PROTUNE_EXPOSURE_POS_1_5 = 13,
1649    #[doc = "+2.0 EV."]
1650    GOPRO_PROTUNE_EXPOSURE_POS_2_0 = 14,
1651    #[doc = "+2.5 EV (Hero 3+ Only)."]
1652    GOPRO_PROTUNE_EXPOSURE_POS_2_5 = 15,
1653    #[doc = "+3.0 EV (Hero 3+ Only)."]
1654    GOPRO_PROTUNE_EXPOSURE_POS_3_0 = 16,
1655    #[doc = "+3.5 EV (Hero 3+ Only)."]
1656    GOPRO_PROTUNE_EXPOSURE_POS_3_5 = 17,
1657    #[doc = "+4.0 EV (Hero 3+ Only)."]
1658    GOPRO_PROTUNE_EXPOSURE_POS_4_0 = 18,
1659    #[doc = "+4.5 EV (Hero 3+ Only)."]
1660    GOPRO_PROTUNE_EXPOSURE_POS_4_5 = 19,
1661    #[doc = "+5.0 EV (Hero 3+ Only)."]
1662    GOPRO_PROTUNE_EXPOSURE_POS_5_0 = 20,
1663}
1664impl GoproProtuneExposure {
1665    pub const DEFAULT: Self = Self::GOPRO_PROTUNE_EXPOSURE_NEG_5_0;
1666}
1667impl Default for GoproProtuneExposure {
1668    fn default() -> Self {
1669        Self::DEFAULT
1670    }
1671}
1672#[cfg_attr(feature = "ts", derive(TS))]
1673#[cfg_attr(feature = "ts", ts(export))]
1674#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1676#[cfg_attr(feature = "serde", serde(tag = "type"))]
1677#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1678#[repr(u32)]
1679pub enum GoproProtuneGain {
1680    #[doc = "ISO 400."]
1681    GOPRO_PROTUNE_GAIN_400 = 0,
1682    #[doc = "ISO 800 (Only Hero 4)."]
1683    GOPRO_PROTUNE_GAIN_800 = 1,
1684    #[doc = "ISO 1600."]
1685    GOPRO_PROTUNE_GAIN_1600 = 2,
1686    #[doc = "ISO 3200 (Only Hero 4)."]
1687    GOPRO_PROTUNE_GAIN_3200 = 3,
1688    #[doc = "ISO 6400."]
1689    GOPRO_PROTUNE_GAIN_6400 = 4,
1690}
1691impl GoproProtuneGain {
1692    pub const DEFAULT: Self = Self::GOPRO_PROTUNE_GAIN_400;
1693}
1694impl Default for GoproProtuneGain {
1695    fn default() -> Self {
1696        Self::DEFAULT
1697    }
1698}
1699#[cfg_attr(feature = "ts", derive(TS))]
1700#[cfg_attr(feature = "ts", ts(export))]
1701#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1703#[cfg_attr(feature = "serde", serde(tag = "type"))]
1704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1705#[repr(u32)]
1706pub enum GoproProtuneSharpness {
1707    #[doc = "Low Sharpness."]
1708    GOPRO_PROTUNE_SHARPNESS_LOW = 0,
1709    #[doc = "Medium Sharpness."]
1710    GOPRO_PROTUNE_SHARPNESS_MEDIUM = 1,
1711    #[doc = "High Sharpness."]
1712    GOPRO_PROTUNE_SHARPNESS_HIGH = 2,
1713}
1714impl GoproProtuneSharpness {
1715    pub const DEFAULT: Self = Self::GOPRO_PROTUNE_SHARPNESS_LOW;
1716}
1717impl Default for GoproProtuneSharpness {
1718    fn default() -> Self {
1719        Self::DEFAULT
1720    }
1721}
1722#[cfg_attr(feature = "ts", derive(TS))]
1723#[cfg_attr(feature = "ts", ts(export))]
1724#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1725#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1726#[cfg_attr(feature = "serde", serde(tag = "type"))]
1727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1728#[repr(u32)]
1729pub enum GoproProtuneWhiteBalance {
1730    #[doc = "Auto."]
1731    GOPRO_PROTUNE_WHITE_BALANCE_AUTO = 0,
1732    #[doc = "3000K."]
1733    GOPRO_PROTUNE_WHITE_BALANCE_3000K = 1,
1734    #[doc = "5500K."]
1735    GOPRO_PROTUNE_WHITE_BALANCE_5500K = 2,
1736    #[doc = "6500K."]
1737    GOPRO_PROTUNE_WHITE_BALANCE_6500K = 3,
1738    #[doc = "Camera Raw."]
1739    GOPRO_PROTUNE_WHITE_BALANCE_RAW = 4,
1740}
1741impl GoproProtuneWhiteBalance {
1742    pub const DEFAULT: Self = Self::GOPRO_PROTUNE_WHITE_BALANCE_AUTO;
1743}
1744impl Default for GoproProtuneWhiteBalance {
1745    fn default() -> Self {
1746        Self::DEFAULT
1747    }
1748}
1749#[cfg_attr(feature = "ts", derive(TS))]
1750#[cfg_attr(feature = "ts", ts(export))]
1751#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1753#[cfg_attr(feature = "serde", serde(tag = "type"))]
1754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1755#[repr(u32)]
1756pub enum GoproRequestStatus {
1757    #[doc = "The write message with ID indicated succeeded."]
1758    GOPRO_REQUEST_SUCCESS = 0,
1759    #[doc = "The write message with ID indicated failed."]
1760    GOPRO_REQUEST_FAILED = 1,
1761}
1762impl GoproRequestStatus {
1763    pub const DEFAULT: Self = Self::GOPRO_REQUEST_SUCCESS;
1764}
1765impl Default for GoproRequestStatus {
1766    fn default() -> Self {
1767        Self::DEFAULT
1768    }
1769}
1770#[cfg_attr(feature = "ts", derive(TS))]
1771#[cfg_attr(feature = "ts", ts(export))]
1772#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1774#[cfg_attr(feature = "serde", serde(tag = "type"))]
1775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1776#[repr(u32)]
1777pub enum GoproResolution {
1778    #[doc = "848 x 480 (480p)."]
1779    GOPRO_RESOLUTION_480p = 0,
1780    #[doc = "1280 x 720 (720p)."]
1781    GOPRO_RESOLUTION_720p = 1,
1782    #[doc = "1280 x 960 (960p)."]
1783    GOPRO_RESOLUTION_960p = 2,
1784    #[doc = "1920 x 1080 (1080p)."]
1785    GOPRO_RESOLUTION_1080p = 3,
1786    #[doc = "1920 x 1440 (1440p)."]
1787    GOPRO_RESOLUTION_1440p = 4,
1788    #[doc = "2704 x 1440 (2.7k-17:9)."]
1789    GOPRO_RESOLUTION_2_7k_17_9 = 5,
1790    #[doc = "2704 x 1524 (2.7k-16:9)."]
1791    GOPRO_RESOLUTION_2_7k_16_9 = 6,
1792    #[doc = "2704 x 2028 (2.7k-4:3)."]
1793    GOPRO_RESOLUTION_2_7k_4_3 = 7,
1794    #[doc = "3840 x 2160 (4k-16:9)."]
1795    GOPRO_RESOLUTION_4k_16_9 = 8,
1796    #[doc = "4096 x 2160 (4k-17:9)."]
1797    GOPRO_RESOLUTION_4k_17_9 = 9,
1798    #[doc = "1280 x 720 (720p-SuperView)."]
1799    GOPRO_RESOLUTION_720p_SUPERVIEW = 10,
1800    #[doc = "1920 x 1080 (1080p-SuperView)."]
1801    GOPRO_RESOLUTION_1080p_SUPERVIEW = 11,
1802    #[doc = "2704 x 1520 (2.7k-SuperView)."]
1803    GOPRO_RESOLUTION_2_7k_SUPERVIEW = 12,
1804    #[doc = "3840 x 2160 (4k-SuperView)."]
1805    GOPRO_RESOLUTION_4k_SUPERVIEW = 13,
1806}
1807impl GoproResolution {
1808    pub const DEFAULT: Self = Self::GOPRO_RESOLUTION_480p;
1809}
1810impl Default for GoproResolution {
1811    fn default() -> Self {
1812        Self::DEFAULT
1813    }
1814}
1815#[cfg_attr(feature = "ts", derive(TS))]
1816#[cfg_attr(feature = "ts", ts(export))]
1817#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1819#[cfg_attr(feature = "serde", serde(tag = "type"))]
1820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1821#[repr(u32)]
1822pub enum GoproVideoSettingsFlags {
1823    #[doc = "0=NTSC, 1=PAL."]
1824    GOPRO_VIDEO_SETTINGS_TV_MODE = 1,
1825}
1826impl GoproVideoSettingsFlags {
1827    pub const DEFAULT: Self = Self::GOPRO_VIDEO_SETTINGS_TV_MODE;
1828}
1829impl Default for GoproVideoSettingsFlags {
1830    fn default() -> Self {
1831        Self::DEFAULT
1832    }
1833}
1834#[cfg_attr(feature = "ts", derive(TS))]
1835#[cfg_attr(feature = "ts", ts(export))]
1836#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1837#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1838#[cfg_attr(feature = "serde", serde(tag = "type"))]
1839#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1840#[repr(u32)]
1841#[doc = "Type of GPS fix"]
1842pub enum GpsFixType {
1843    #[doc = "No GPS connected"]
1844    GPS_FIX_TYPE_NO_GPS = 0,
1845    #[doc = "No position information, GPS is connected"]
1846    GPS_FIX_TYPE_NO_FIX = 1,
1847    #[doc = "2D position"]
1848    GPS_FIX_TYPE_2D_FIX = 2,
1849    #[doc = "3D position"]
1850    GPS_FIX_TYPE_3D_FIX = 3,
1851    #[doc = "DGPS/SBAS aided 3D position"]
1852    GPS_FIX_TYPE_DGPS = 4,
1853    #[doc = "RTK float, 3D position"]
1854    GPS_FIX_TYPE_RTK_FLOAT = 5,
1855    #[doc = "RTK Fixed, 3D position"]
1856    GPS_FIX_TYPE_RTK_FIXED = 6,
1857    #[doc = "Static fixed, typically used for base stations"]
1858    GPS_FIX_TYPE_STATIC = 7,
1859    #[doc = "PPP, 3D position."]
1860    GPS_FIX_TYPE_PPP = 8,
1861}
1862impl GpsFixType {
1863    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1864}
1865impl Default for GpsFixType {
1866    fn default() -> Self {
1867        Self::DEFAULT
1868    }
1869}
1870bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1871impl GpsInputIgnoreFlags {
1872    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1873}
1874impl Default for GpsInputIgnoreFlags {
1875    fn default() -> Self {
1876        Self::DEFAULT
1877    }
1878}
1879#[cfg_attr(feature = "ts", derive(TS))]
1880#[cfg_attr(feature = "ts", ts(export))]
1881#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1883#[cfg_attr(feature = "serde", serde(tag = "type"))]
1884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1885#[repr(u32)]
1886#[doc = "Gripper actions."]
1887pub enum GripperActions {
1888    #[doc = "Gripper release cargo."]
1889    GRIPPER_ACTION_RELEASE = 0,
1890    #[doc = "Gripper grab onto cargo."]
1891    GRIPPER_ACTION_GRAB = 1,
1892}
1893impl GripperActions {
1894    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1895}
1896impl Default for GripperActions {
1897    fn default() -> Self {
1898        Self::DEFAULT
1899    }
1900}
1901#[cfg_attr(feature = "ts", derive(TS))]
1902#[cfg_attr(feature = "ts", ts(export))]
1903#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1904#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1905#[cfg_attr(feature = "serde", serde(tag = "type"))]
1906#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1907#[repr(u32)]
1908pub enum HeadingType {
1909    HEADING_TYPE_COURSE_OVER_GROUND = 0,
1910    HEADING_TYPE_HEADING = 1,
1911    HEADING_TYPE_DEFAULT = 2,
1912}
1913impl HeadingType {
1914    pub const DEFAULT: Self = Self::HEADING_TYPE_COURSE_OVER_GROUND;
1915}
1916impl Default for HeadingType {
1917    fn default() -> Self {
1918        Self::DEFAULT
1919    }
1920}
1921bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1922impl HighresImuUpdatedFlags {
1923    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1924}
1925impl Default for HighresImuUpdatedFlags {
1926    fn default() -> Self {
1927        Self::DEFAULT
1928    }
1929}
1930bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1931impl HilActuatorControlsFlags {
1932    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1933}
1934impl Default for HilActuatorControlsFlags {
1935    fn default() -> Self {
1936        Self::DEFAULT
1937    }
1938}
1939bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1940impl HilSensorUpdatedFlags {
1941    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1942}
1943impl Default for HilSensorUpdatedFlags {
1944    fn default() -> Self {
1945        Self::DEFAULT
1946    }
1947}
1948bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1949impl HlFailureFlag {
1950    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1951}
1952impl Default for HlFailureFlag {
1953    fn default() -> Self {
1954        Self::DEFAULT
1955    }
1956}
1957#[cfg_attr(feature = "ts", derive(TS))]
1958#[cfg_attr(feature = "ts", ts(export))]
1959#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1961#[cfg_attr(feature = "serde", serde(tag = "type"))]
1962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1963#[repr(u32)]
1964pub enum IcarousFmsState {
1965    ICAROUS_FMS_STATE_IDLE = 0,
1966    ICAROUS_FMS_STATE_TAKEOFF = 1,
1967    ICAROUS_FMS_STATE_CLIMB = 2,
1968    ICAROUS_FMS_STATE_CRUISE = 3,
1969    ICAROUS_FMS_STATE_APPROACH = 4,
1970    ICAROUS_FMS_STATE_LAND = 5,
1971}
1972impl IcarousFmsState {
1973    pub const DEFAULT: Self = Self::ICAROUS_FMS_STATE_IDLE;
1974}
1975impl Default for IcarousFmsState {
1976    fn default() -> Self {
1977        Self::DEFAULT
1978    }
1979}
1980#[cfg_attr(feature = "ts", derive(TS))]
1981#[cfg_attr(feature = "ts", ts(export))]
1982#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1983#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1984#[cfg_attr(feature = "serde", serde(tag = "type"))]
1985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1986#[repr(u32)]
1987pub enum IcarousTrackBandTypes {
1988    ICAROUS_TRACK_BAND_TYPE_NONE = 0,
1989    ICAROUS_TRACK_BAND_TYPE_NEAR = 1,
1990    ICAROUS_TRACK_BAND_TYPE_RECOVERY = 2,
1991}
1992impl IcarousTrackBandTypes {
1993    pub const DEFAULT: Self = Self::ICAROUS_TRACK_BAND_TYPE_NONE;
1994}
1995impl Default for IcarousTrackBandTypes {
1996    fn default() -> Self {
1997        Self::DEFAULT
1998    }
1999}
2000bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
2001impl IlluminatorErrorFlags {
2002    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
2003}
2004impl Default for IlluminatorErrorFlags {
2005    fn default() -> Self {
2006        Self::DEFAULT
2007    }
2008}
2009#[cfg_attr(feature = "ts", derive(TS))]
2010#[cfg_attr(feature = "ts", ts(export))]
2011#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2012#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2013#[cfg_attr(feature = "serde", serde(tag = "type"))]
2014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2015#[repr(u32)]
2016#[doc = "Modes of illuminator"]
2017pub enum IlluminatorMode {
2018    #[doc = "Illuminator mode is not specified/unknown"]
2019    ILLUMINATOR_MODE_UNKNOWN = 0,
2020    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
2021    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
2022    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
2023    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
2024}
2025impl IlluminatorMode {
2026    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
2027}
2028impl Default for IlluminatorMode {
2029    fn default() -> Self {
2030        Self::DEFAULT
2031    }
2032}
2033#[cfg_attr(feature = "ts", derive(TS))]
2034#[cfg_attr(feature = "ts", ts(export))]
2035#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2037#[cfg_attr(feature = "serde", serde(tag = "type"))]
2038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2039#[repr(u32)]
2040#[doc = "Type of landing target"]
2041pub enum LandingTargetType {
2042    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
2043    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
2044    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
2045    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
2046    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
2047    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
2048    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
2049    LANDING_TARGET_TYPE_VISION_OTHER = 3,
2050}
2051impl LandingTargetType {
2052    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
2053}
2054impl Default for LandingTargetType {
2055    fn default() -> Self {
2056        Self::DEFAULT
2057    }
2058}
2059#[cfg_attr(feature = "ts", derive(TS))]
2060#[cfg_attr(feature = "ts", ts(export))]
2061#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2063#[cfg_attr(feature = "serde", serde(tag = "type"))]
2064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2065#[repr(u32)]
2066pub enum LedControlPattern {
2067    #[doc = "LED patterns off (return control to regular vehicle control)."]
2068    LED_CONTROL_PATTERN_OFF = 0,
2069    #[doc = "LEDs show pattern during firmware update."]
2070    LED_CONTROL_PATTERN_FIRMWAREUPDATE = 1,
2071    #[doc = "Custom Pattern using custom bytes fields."]
2072    LED_CONTROL_PATTERN_CUSTOM = 255,
2073}
2074impl LedControlPattern {
2075    pub const DEFAULT: Self = Self::LED_CONTROL_PATTERN_OFF;
2076}
2077impl Default for LedControlPattern {
2078    fn default() -> Self {
2079        Self::DEFAULT
2080    }
2081}
2082bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct LimitModule : u8 { # [doc = "Pre-initialization."] const LIMIT_GPSLOCK = 1 ; # [doc = "Disabled."] const LIMIT_GEOFENCE = 2 ; # [doc = "Checking limits."] const LIMIT_ALTITUDE = 4 ; } }
2083impl LimitModule {
2084    pub const DEFAULT: Self = Self::LIMIT_GPSLOCK;
2085}
2086impl Default for LimitModule {
2087    fn default() -> Self {
2088        Self::DEFAULT
2089    }
2090}
2091#[cfg_attr(feature = "ts", derive(TS))]
2092#[cfg_attr(feature = "ts", ts(export))]
2093#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2094#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2095#[cfg_attr(feature = "serde", serde(tag = "type"))]
2096#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2097#[repr(u32)]
2098pub enum LimitsState {
2099    #[doc = "Pre-initialization."]
2100    LIMITS_INIT = 0,
2101    #[doc = "Disabled."]
2102    LIMITS_DISABLED = 1,
2103    #[doc = "Checking limits."]
2104    LIMITS_ENABLED = 2,
2105    #[doc = "A limit has been breached."]
2106    LIMITS_TRIGGERED = 3,
2107    #[doc = "Taking action e.g. Return/RTL."]
2108    LIMITS_RECOVERING = 4,
2109    #[doc = "We're no longer in breach of a limit."]
2110    LIMITS_RECOVERED = 5,
2111}
2112impl LimitsState {
2113    pub const DEFAULT: Self = Self::LIMITS_INIT;
2114}
2115impl Default for LimitsState {
2116    fn default() -> Self {
2117        Self::DEFAULT
2118    }
2119}
2120#[cfg_attr(feature = "ts", derive(TS))]
2121#[cfg_attr(feature = "ts", ts(export))]
2122#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2124#[cfg_attr(feature = "serde", serde(tag = "type"))]
2125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2126#[repr(u32)]
2127pub enum MagCalStatus {
2128    MAG_CAL_NOT_STARTED = 0,
2129    MAG_CAL_WAITING_TO_START = 1,
2130    MAG_CAL_RUNNING_STEP_ONE = 2,
2131    MAG_CAL_RUNNING_STEP_TWO = 3,
2132    MAG_CAL_SUCCESS = 4,
2133    MAG_CAL_FAILED = 5,
2134    MAG_CAL_BAD_ORIENTATION = 6,
2135    MAG_CAL_BAD_RADIUS = 7,
2136}
2137impl MagCalStatus {
2138    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
2139}
2140impl Default for MagCalStatus {
2141    fn default() -> Self {
2142        Self::DEFAULT
2143    }
2144}
2145#[cfg_attr(feature = "ts", derive(TS))]
2146#[cfg_attr(feature = "ts", ts(export))]
2147#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2148#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2149#[cfg_attr(feature = "serde", serde(tag = "type"))]
2150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2151#[repr(u32)]
2152pub enum MavArmAuthDeniedReason {
2153    #[doc = "Not a specific reason"]
2154    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
2155    #[doc = "Authorizer will send the error as string to GCS"]
2156    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
2157    #[doc = "At least one waypoint have a invalid value"]
2158    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
2159    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
2160    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
2161    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
2162    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
2163    #[doc = "Weather is not good to fly"]
2164    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
2165}
2166impl MavArmAuthDeniedReason {
2167    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
2168}
2169impl Default for MavArmAuthDeniedReason {
2170    fn default() -> Self {
2171        Self::DEFAULT
2172    }
2173}
2174#[cfg_attr(feature = "ts", derive(TS))]
2175#[cfg_attr(feature = "ts", ts(export))]
2176#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2178#[cfg_attr(feature = "serde", serde(tag = "type"))]
2179#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2180#[repr(u32)]
2181#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
2182pub enum MavAutopilot {
2183    #[doc = "Generic autopilot, full support for everything"]
2184    MAV_AUTOPILOT_GENERIC = 0,
2185    #[doc = "Reserved for future use."]
2186    MAV_AUTOPILOT_RESERVED = 1,
2187    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
2188    MAV_AUTOPILOT_SLUGS = 2,
2189    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
2190    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
2191    #[doc = "OpenPilot, <http://openpilot.org>"]
2192    MAV_AUTOPILOT_OPENPILOT = 4,
2193    #[doc = "Generic autopilot only supporting simple waypoints"]
2194    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
2195    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
2196    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
2197    #[doc = "Generic autopilot supporting the full mission command set"]
2198    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
2199    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
2200    MAV_AUTOPILOT_INVALID = 8,
2201    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
2202    MAV_AUTOPILOT_PPZ = 9,
2203    #[doc = "UAV Dev Board"]
2204    MAV_AUTOPILOT_UDB = 10,
2205    #[doc = "FlexiPilot"]
2206    MAV_AUTOPILOT_FP = 11,
2207    #[doc = "PX4 Autopilot - <http://px4.io/>"]
2208    MAV_AUTOPILOT_PX4 = 12,
2209    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
2210    MAV_AUTOPILOT_SMACCMPILOT = 13,
2211    #[doc = "AutoQuad -- <http://autoquad.org>"]
2212    MAV_AUTOPILOT_AUTOQUAD = 14,
2213    #[doc = "Armazila -- <http://armazila.com>"]
2214    MAV_AUTOPILOT_ARMAZILA = 15,
2215    #[doc = "Aerob -- <http://aerob.ru>"]
2216    MAV_AUTOPILOT_AEROB = 16,
2217    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
2218    MAV_AUTOPILOT_ASLUAV = 17,
2219    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
2220    MAV_AUTOPILOT_SMARTAP = 18,
2221    #[doc = "AirRails - <http://uaventure.com>"]
2222    MAV_AUTOPILOT_AIRRAILS = 19,
2223    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
2224    MAV_AUTOPILOT_REFLEX = 20,
2225}
2226impl MavAutopilot {
2227    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
2228}
2229impl Default for MavAutopilot {
2230    fn default() -> Self {
2231        Self::DEFAULT
2232    }
2233}
2234#[cfg_attr(feature = "ts", derive(TS))]
2235#[cfg_attr(feature = "ts", ts(export))]
2236#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2238#[cfg_attr(feature = "serde", serde(tag = "type"))]
2239#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2240#[repr(u32)]
2241#[doc = "Enumeration for battery charge states."]
2242pub enum MavBatteryChargeState {
2243    #[doc = "Low battery state is not provided"]
2244    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
2245    #[doc = "Battery is not in low state. Normal operation."]
2246    MAV_BATTERY_CHARGE_STATE_OK = 1,
2247    #[doc = "Battery state is low, warn and monitor close."]
2248    MAV_BATTERY_CHARGE_STATE_LOW = 2,
2249    #[doc = "Battery state is critical, return or abort immediately."]
2250    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
2251    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
2252    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
2253    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
2254    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
2255    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
2256    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
2257    #[doc = "Battery is charging."]
2258    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
2259}
2260impl MavBatteryChargeState {
2261    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
2262}
2263impl Default for MavBatteryChargeState {
2264    fn default() -> Self {
2265        Self::DEFAULT
2266    }
2267}
2268bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
2269impl MavBatteryFault {
2270    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
2271}
2272impl Default for MavBatteryFault {
2273    fn default() -> Self {
2274        Self::DEFAULT
2275    }
2276}
2277#[cfg_attr(feature = "ts", derive(TS))]
2278#[cfg_attr(feature = "ts", ts(export))]
2279#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2281#[cfg_attr(feature = "serde", serde(tag = "type"))]
2282#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2283#[repr(u32)]
2284#[doc = "Enumeration of battery functions"]
2285pub enum MavBatteryFunction {
2286    #[doc = "Battery function is unknown"]
2287    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
2288    #[doc = "Battery supports all flight systems"]
2289    MAV_BATTERY_FUNCTION_ALL = 1,
2290    #[doc = "Battery for the propulsion system"]
2291    MAV_BATTERY_FUNCTION_PROPULSION = 2,
2292    #[doc = "Avionics battery"]
2293    MAV_BATTERY_FUNCTION_AVIONICS = 3,
2294    #[doc = "Payload battery"]
2295    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
2296}
2297impl MavBatteryFunction {
2298    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
2299}
2300impl Default for MavBatteryFunction {
2301    fn default() -> Self {
2302        Self::DEFAULT
2303    }
2304}
2305#[cfg_attr(feature = "ts", derive(TS))]
2306#[cfg_attr(feature = "ts", ts(export))]
2307#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2309#[cfg_attr(feature = "serde", serde(tag = "type"))]
2310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2311#[repr(u32)]
2312#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
2313pub enum MavBatteryMode {
2314    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
2315    MAV_BATTERY_MODE_UNKNOWN = 0,
2316    #[doc = "Battery is auto discharging (towards storage level)."]
2317    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
2318    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
2319    MAV_BATTERY_MODE_HOT_SWAP = 2,
2320}
2321impl MavBatteryMode {
2322    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
2323}
2324impl Default for MavBatteryMode {
2325    fn default() -> Self {
2326        Self::DEFAULT
2327    }
2328}
2329#[cfg_attr(feature = "ts", derive(TS))]
2330#[cfg_attr(feature = "ts", ts(export))]
2331#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2332#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2333#[cfg_attr(feature = "serde", serde(tag = "type"))]
2334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2335#[repr(u32)]
2336#[doc = "Enumeration of battery types"]
2337pub enum MavBatteryType {
2338    #[doc = "Not specified."]
2339    MAV_BATTERY_TYPE_UNKNOWN = 0,
2340    #[doc = "Lithium polymer battery"]
2341    MAV_BATTERY_TYPE_LIPO = 1,
2342    #[doc = "Lithium-iron-phosphate battery"]
2343    MAV_BATTERY_TYPE_LIFE = 2,
2344    #[doc = "Lithium-ION battery"]
2345    MAV_BATTERY_TYPE_LION = 3,
2346    #[doc = "Nickel metal hydride battery"]
2347    MAV_BATTERY_TYPE_NIMH = 4,
2348}
2349impl MavBatteryType {
2350    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
2351}
2352impl Default for MavBatteryType {
2353    fn default() -> Self {
2354        Self::DEFAULT
2355    }
2356}
2357#[cfg_attr(feature = "ts", derive(TS))]
2358#[cfg_attr(feature = "ts", ts(export))]
2359#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2360#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2361#[cfg_attr(feature = "serde", serde(tag = "type"))]
2362#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2363#[repr(u32)]
2364#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
2365pub enum MavCmd {
2366    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
2367    MAV_CMD_NAV_WAYPOINT = 16,
2368    #[doc = "Loiter around this waypoint an unlimited amount of time"]
2369    MAV_CMD_NAV_LOITER_UNLIM = 17,
2370    #[doc = "Loiter around this waypoint for X turns"]
2371    MAV_CMD_NAV_LOITER_TURNS = 18,
2372    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
2373    MAV_CMD_NAV_LOITER_TIME = 19,
2374    #[doc = "Return to launch location"]
2375    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
2376    #[doc = "Land at location."]
2377    MAV_CMD_NAV_LAND = 21,
2378    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
2379    MAV_CMD_NAV_TAKEOFF = 22,
2380    #[doc = "Land at local position (local frame only)"]
2381    MAV_CMD_NAV_LAND_LOCAL = 23,
2382    #[doc = "Takeoff from local position (local frame only)"]
2383    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
2384    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
2385    MAV_CMD_NAV_FOLLOW = 25,
2386    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
2387    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
2388    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
2389    MAV_CMD_NAV_LOITER_TO_ALT = 31,
2390    #[doc = "Begin following a target"]
2391    MAV_CMD_DO_FOLLOW = 32,
2392    #[doc = "Reposition the MAV after a follow target command has been sent"]
2393    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
2394    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
2395    MAV_CMD_DO_ORBIT = 34,
2396    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
2397    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
2398    MAV_CMD_NAV_ROI = 80,
2399    #[doc = "Control autonomous path planning on the MAV."]
2400    MAV_CMD_NAV_PATHPLANNING = 81,
2401    #[doc = "Navigate to waypoint using a spline path."]
2402    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
2403    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
2404    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
2405    #[doc = "Land using VTOL mode"]
2406    MAV_CMD_NAV_VTOL_LAND = 85,
2407    #[doc = "hand control over to an external controller"]
2408    MAV_CMD_NAV_GUIDED_ENABLE = 92,
2409    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
2410    MAV_CMD_NAV_DELAY = 93,
2411    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
2412    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
2413    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
2414    MAV_CMD_NAV_LAST = 95,
2415    #[doc = "Delay mission state machine."]
2416    MAV_CMD_CONDITION_DELAY = 112,
2417    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
2418    MAV_CMD_CONDITION_CHANGE_ALT = 113,
2419    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
2420    MAV_CMD_CONDITION_DISTANCE = 114,
2421    #[doc = "Reach a certain target angle."]
2422    MAV_CMD_CONDITION_YAW = 115,
2423    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
2424    MAV_CMD_CONDITION_LAST = 159,
2425    #[doc = "Set system mode."]
2426    MAV_CMD_DO_SET_MODE = 176,
2427    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
2428    MAV_CMD_DO_JUMP = 177,
2429    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
2430    MAV_CMD_DO_CHANGE_SPEED = 178,
2431    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
2432    MAV_CMD_DO_SET_HOME = 179,
2433    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
2434    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
2435    MAV_CMD_DO_SET_PARAMETER = 180,
2436    #[doc = "Set a relay to a condition."]
2437    MAV_CMD_DO_SET_RELAY = 181,
2438    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
2439    MAV_CMD_DO_REPEAT_RELAY = 182,
2440    #[doc = "Set a servo to a desired PWM value."]
2441    MAV_CMD_DO_SET_SERVO = 183,
2442    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
2443    MAV_CMD_DO_REPEAT_SERVO = 184,
2444    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
2445    MAV_CMD_DO_FLIGHTTERMINATION = 185,
2446    #[doc = "Change altitude set point."]
2447    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
2448    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
2449    MAV_CMD_DO_SET_ACTUATOR = 187,
2450    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
2451    MAV_CMD_DO_RETURN_PATH_START = 188,
2452    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
2453    MAV_CMD_DO_LAND_START = 189,
2454    #[doc = "Mission command to perform a landing from a rally point."]
2455    MAV_CMD_DO_RALLY_LAND = 190,
2456    #[doc = "Mission command to safely abort an autonomous landing."]
2457    MAV_CMD_DO_GO_AROUND = 191,
2458    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
2459    MAV_CMD_DO_REPOSITION = 192,
2460    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
2461    MAV_CMD_DO_PAUSE_CONTINUE = 193,
2462    #[doc = "Set moving direction to forward or reverse."]
2463    MAV_CMD_DO_SET_REVERSE = 194,
2464    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
2465    MAV_CMD_DO_SET_ROI_LOCATION = 195,
2466    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2467    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
2468    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
2469    MAV_CMD_DO_SET_ROI_NONE = 197,
2470    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2471    MAV_CMD_DO_SET_ROI_SYSID = 198,
2472    #[doc = "Control onboard camera system."]
2473    MAV_CMD_DO_CONTROL_VIDEO = 200,
2474    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
2475    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
2476    MAV_CMD_DO_SET_ROI = 201,
2477    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2478    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
2479    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2480    MAV_CMD_DO_DIGICAM_CONTROL = 203,
2481    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
2482    #[doc = "Mission command to configure a camera or antenna mount"]
2483    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
2484    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
2485    #[doc = "Mission command to control a camera or antenna mount"]
2486    MAV_CMD_DO_MOUNT_CONTROL = 205,
2487    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
2488    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
2489    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
2490    MAV_CMD_DO_FENCE_ENABLE = 207,
2491    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
2492    MAV_CMD_DO_PARACHUTE = 208,
2493    #[doc = "Command to perform motor test."]
2494    MAV_CMD_DO_MOTOR_TEST = 209,
2495    #[doc = "Change to/from inverted flight."]
2496    MAV_CMD_DO_INVERTED_FLIGHT = 210,
2497    #[doc = "Mission command to operate a gripper."]
2498    MAV_CMD_DO_GRIPPER = 211,
2499    #[doc = "Enable/disable autotune."]
2500    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
2501    #[doc = "Sets a desired vehicle turn angle and speed change."]
2502    MAV_CMD_NAV_SET_YAW_SPEED = 213,
2503    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
2504    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
2505    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
2506    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
2507    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
2508    #[doc = "set id of master controller"]
2509    MAV_CMD_DO_GUIDED_MASTER = 221,
2510    #[doc = "Set limits for external control"]
2511    MAV_CMD_DO_GUIDED_LIMITS = 222,
2512    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
2513    MAV_CMD_DO_ENGINE_CONTROL = 223,
2514    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
2515    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
2516    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
2517    MAV_CMD_DO_LAST = 240,
2518    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
2519    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
2520    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
2521    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
2522    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
2523    MAV_CMD_PREFLIGHT_UAVCAN = 243,
2524    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
2525    MAV_CMD_PREFLIGHT_STORAGE = 245,
2526    #[doc = "Request the reboot or shutdown of system components."]
2527    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
2528    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
2529    MAV_CMD_OVERRIDE_GOTO = 252,
2530    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
2531    MAV_CMD_OBLIQUE_SURVEY = 260,
2532    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
2533    MAV_CMD_DO_SET_STANDARD_MODE = 262,
2534    #[doc = "start running a mission"]
2535    MAV_CMD_MISSION_START = 300,
2536    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
2537    MAV_CMD_ACTUATOR_TEST = 310,
2538    #[doc = "Actuator configuration command."]
2539    MAV_CMD_CONFIGURE_ACTUATOR = 311,
2540    #[doc = "Arms / Disarms a component"]
2541    MAV_CMD_COMPONENT_ARM_DISARM = 400,
2542    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
2543    MAV_CMD_RUN_PREARM_CHECKS = 401,
2544    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2545    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
2546    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2547    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
2548    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
2549    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
2550    MAV_CMD_GET_HOME_POSITION = 410,
2551    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
2552    MAV_CMD_INJECT_FAILURE = 420,
2553    #[doc = "Starts receiver pairing."]
2554    MAV_CMD_START_RX_PAIR = 500,
2555    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
2556    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
2557    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
2558    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
2559    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
2560    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
2561    MAV_CMD_REQUEST_MESSAGE = 512,
2562    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2563    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
2564    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
2565    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2566    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
2567    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
2568    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2569    #[doc = "Request camera information (CAMERA_INFORMATION)."]
2570    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
2571    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2572    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
2573    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
2574    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2575    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
2576    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
2577    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
2578    MAV_CMD_STORAGE_FORMAT = 526,
2579    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2580    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
2581    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
2582    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2583    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
2584    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
2585    #[doc = "Reset all camera settings to Factory Default"]
2586    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
2587    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
2588    MAV_CMD_SET_CAMERA_MODE = 530,
2589    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2590    MAV_CMD_SET_CAMERA_ZOOM = 531,
2591    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2592    MAV_CMD_SET_CAMERA_FOCUS = 532,
2593    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
2594    MAV_CMD_SET_STORAGE_USAGE = 533,
2595    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
2596    MAV_CMD_SET_CAMERA_SOURCE = 534,
2597    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
2598    MAV_CMD_JUMP_TAG = 600,
2599    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
2600    MAV_CMD_DO_JUMP_TAG = 601,
2601    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
2602    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
2603    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
2604    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
2605    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2606    MAV_CMD_IMAGE_START_CAPTURE = 2000,
2607    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2608    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
2609    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2610    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
2611    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
2612    #[doc = "Enable or disable on-board camera triggering system."]
2613    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
2614    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
2615    MAV_CMD_CAMERA_TRACK_POINT = 2004,
2616    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
2617    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
2618    #[doc = "Stops ongoing tracking."]
2619    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
2620    #[doc = "Starts video capture (recording)."]
2621    MAV_CMD_VIDEO_START_CAPTURE = 2500,
2622    #[doc = "Stop the current video capture (recording)."]
2623    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
2624    #[doc = "Start video streaming"]
2625    MAV_CMD_VIDEO_START_STREAMING = 2502,
2626    #[doc = "Stop the given video stream"]
2627    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
2628    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2629    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
2630    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
2631    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2632    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
2633    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
2634    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
2635    MAV_CMD_LOGGING_START = 2510,
2636    #[doc = "Request to stop streaming log data over MAVLink"]
2637    MAV_CMD_LOGGING_STOP = 2511,
2638    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
2639    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
2640    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
2641    #[doc = "Create a panorama at the current position"]
2642    MAV_CMD_PANORAMA_CREATE = 2800,
2643    #[doc = "Request VTOL transition"]
2644    MAV_CMD_DO_VTOL_TRANSITION = 3000,
2645    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
2646    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
2647    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
2648    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
2649    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
2650    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
2651    #[doc = "Delay mission state machine until gate has been reached."]
2652    MAV_CMD_CONDITION_GATE = 4501,
2653    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
2654    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
2655    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
2656    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
2657    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
2658    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
2659    #[doc = "Circular fence area. The vehicle must stay inside this area."]
2660    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
2661    #[doc = "Circular fence area. The vehicle must stay outside this area."]
2662    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
2663    #[doc = "Rally point. You can have multiple rally points defined."]
2664    MAV_CMD_NAV_RALLY_POINT = 5100,
2665    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
2666    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
2667    #[doc = "Change state of safety switch."]
2668    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
2669    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
2670    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
2671    #[deprecated = "  (Deprecated since 2021-06)"]
2672    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
2673    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
2674    #[deprecated = "  (Deprecated since 2021-06)"]
2675    #[doc = "Control the payload deployment."]
2676    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
2677    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
2678    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
2679    #[doc = "Command to operate winch."]
2680    MAV_CMD_DO_WINCH = 42600,
2681    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
2682    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
2683    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2684    MAV_CMD_WAYPOINT_USER_1 = 31000,
2685    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2686    MAV_CMD_WAYPOINT_USER_2 = 31001,
2687    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2688    MAV_CMD_WAYPOINT_USER_3 = 31002,
2689    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2690    MAV_CMD_WAYPOINT_USER_4 = 31003,
2691    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2692    MAV_CMD_WAYPOINT_USER_5 = 31004,
2693    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2694    MAV_CMD_SPATIAL_USER_1 = 31005,
2695    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2696    MAV_CMD_SPATIAL_USER_2 = 31006,
2697    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2698    MAV_CMD_SPATIAL_USER_3 = 31007,
2699    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2700    MAV_CMD_SPATIAL_USER_4 = 31008,
2701    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2702    MAV_CMD_SPATIAL_USER_5 = 31009,
2703    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2704    MAV_CMD_USER_1 = 31010,
2705    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2706    MAV_CMD_USER_2 = 31011,
2707    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2708    MAV_CMD_USER_3 = 31012,
2709    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2710    MAV_CMD_USER_4 = 31013,
2711    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2712    MAV_CMD_USER_5 = 31014,
2713    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
2714    MAV_CMD_CAN_FORWARD = 32000,
2715    #[doc = "Set Loweheiser desired states"]
2716    MAV_CMD_LOWEHEISER_SET_STATE = 10151,
2717    #[doc = "Set the distance to be repeated on mission resume"]
2718    MAV_CMD_DO_SET_RESUME_REPEAT_DIST = 215,
2719    #[doc = "Control attached liquid sprayer"]
2720    MAV_CMD_DO_SPRAYER = 216,
2721    #[doc = "Pass instructions onto scripting, a script should be checking for a new command"]
2722    MAV_CMD_DO_SEND_SCRIPT_MESSAGE = 217,
2723    #[doc = "Execute auxiliary function"]
2724    MAV_CMD_DO_AUX_FUNCTION = 218,
2725    #[doc = "Mission command to wait for an altitude or downwards vertical speed. This is meant for high altitude balloon launches, allowing the aircraft to be idle until either an altitude is reached or a negative vertical speed is reached (indicating early balloon burst). The wiggle time is how often to wiggle the control surfaces to prevent them seizing up."]
2726    MAV_CMD_NAV_ALTITUDE_WAIT = 83,
2727    #[doc = "A system wide power-off event has been initiated."]
2728    MAV_CMD_POWER_OFF_INITIATED = 42000,
2729    #[doc = "FLY button has been clicked."]
2730    MAV_CMD_SOLO_BTN_FLY_CLICK = 42001,
2731    #[doc = "FLY button has been held for 1.5 seconds."]
2732    MAV_CMD_SOLO_BTN_FLY_HOLD = 42002,
2733    #[doc = "PAUSE button has been clicked."]
2734    MAV_CMD_SOLO_BTN_PAUSE_CLICK = 42003,
2735    #[doc = "Magnetometer calibration based on fixed position         in earth field given by inclination, declination and intensity."]
2736    MAV_CMD_FIXED_MAG_CAL = 42004,
2737    #[doc = "Magnetometer calibration based on fixed expected field values."]
2738    MAV_CMD_FIXED_MAG_CAL_FIELD = 42005,
2739    #[doc = "Set EKF sensor source set."]
2740    MAV_CMD_SET_EKF_SOURCE_SET = 42007,
2741    #[doc = "Initiate a magnetometer calibration."]
2742    MAV_CMD_DO_START_MAG_CAL = 42424,
2743    #[doc = "Accept a magnetometer calibration."]
2744    MAV_CMD_DO_ACCEPT_MAG_CAL = 42425,
2745    #[doc = "Cancel a running magnetometer calibration."]
2746    MAV_CMD_DO_CANCEL_MAG_CAL = 42426,
2747    #[doc = "Used when doing accelerometer calibration. When sent to the GCS tells it what position to put the vehicle in. When sent to the vehicle says what position the vehicle is in."]
2748    MAV_CMD_ACCELCAL_VEHICLE_POS = 42429,
2749    #[doc = "Reply with the version banner."]
2750    MAV_CMD_DO_SEND_BANNER = 42428,
2751    #[doc = "Command autopilot to get into factory test/diagnostic mode."]
2752    MAV_CMD_SET_FACTORY_TEST_MODE = 42427,
2753    #[doc = "Causes the gimbal to reset and boot as if it was just powered on."]
2754    MAV_CMD_GIMBAL_RESET = 42501,
2755    #[doc = "Reports progress and success or failure of gimbal axis calibration procedure."]
2756    MAV_CMD_GIMBAL_AXIS_CALIBRATION_STATUS = 42502,
2757    #[doc = "Starts commutation calibration on the gimbal."]
2758    MAV_CMD_GIMBAL_REQUEST_AXIS_CALIBRATION = 42503,
2759    #[doc = "Erases gimbal application and parameters."]
2760    MAV_CMD_GIMBAL_FULL_RESET = 42505,
2761    #[doc = "Update the bootloader"]
2762    MAV_CMD_FLASH_BOOTLOADER = 42650,
2763    #[doc = "Reset battery capacity for batteries that accumulate consumed battery via integration."]
2764    MAV_CMD_BATTERY_RESET = 42651,
2765    #[doc = "Issue a trap signal to the autopilot process, presumably to enter the debugger."]
2766    MAV_CMD_DEBUG_TRAP = 42700,
2767    #[doc = "Control onboard scripting."]
2768    MAV_CMD_SCRIPTING = 42701,
2769    #[doc = "Scripting command as NAV command with wait for completion."]
2770    MAV_CMD_NAV_SCRIPT_TIME = 42702,
2771    #[doc = "Maintain an attitude for a specified time."]
2772    MAV_CMD_NAV_ATTITUDE_TIME = 42703,
2773    #[doc = "Change flight speed at a given rate. This slews the vehicle at a controllable rate between it's previous speed and the new one. (affects GUIDED only. Outside GUIDED, aircraft ignores these commands. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.)"]
2774    MAV_CMD_GUIDED_CHANGE_SPEED = 43000,
2775    #[doc = "Change target altitude at a given rate. This slews the vehicle at a controllable rate between it's previous altitude and the new one. (affects GUIDED only. Outside GUIDED, aircraft ignores these commands. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.)"]
2776    MAV_CMD_GUIDED_CHANGE_ALTITUDE = 43001,
2777    #[doc = "Change to target heading at a given rate, overriding previous heading/s. This slews the vehicle at a controllable rate between it's previous heading and the new one. (affects GUIDED only. Exiting GUIDED returns aircraft to normal behaviour defined elsewhere. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.)"]
2778    MAV_CMD_GUIDED_CHANGE_HEADING = 43002,
2779    #[doc = "Provide a value for height above ground level. This can be used for things like fixed wing and VTOL landing."]
2780    MAV_CMD_SET_HAGL = 43005,
2781}
2782impl MavCmd {
2783    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
2784}
2785impl Default for MavCmd {
2786    fn default() -> Self {
2787        Self::DEFAULT
2788    }
2789}
2790#[cfg_attr(feature = "ts", derive(TS))]
2791#[cfg_attr(feature = "ts", ts(export))]
2792#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2794#[cfg_attr(feature = "serde", serde(tag = "type"))]
2795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2796#[repr(u32)]
2797pub enum MavCmdDoAuxFunctionSwitchLevel {
2798    #[doc = "Switch Low."]
2799    MAV_CMD_DO_AUX_FUNCTION_SWITCH_LEVEL_LOW = 0,
2800    #[doc = "Switch Middle."]
2801    MAV_CMD_DO_AUX_FUNCTION_SWITCH_LEVEL_MIDDLE = 1,
2802    #[doc = "Switch High."]
2803    MAV_CMD_DO_AUX_FUNCTION_SWITCH_LEVEL_HIGH = 2,
2804}
2805impl MavCmdDoAuxFunctionSwitchLevel {
2806    pub const DEFAULT: Self = Self::MAV_CMD_DO_AUX_FUNCTION_SWITCH_LEVEL_LOW;
2807}
2808impl Default for MavCmdDoAuxFunctionSwitchLevel {
2809    fn default() -> Self {
2810        Self::DEFAULT
2811    }
2812}
2813#[cfg_attr(feature = "ts", derive(TS))]
2814#[cfg_attr(feature = "ts", ts(export))]
2815#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2817#[cfg_attr(feature = "serde", serde(tag = "type"))]
2818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2819#[repr(u32)]
2820#[doc = "Possible actions an aircraft can take to avoid a collision."]
2821pub enum MavCollisionAction {
2822    #[doc = "Ignore any potential collisions"]
2823    MAV_COLLISION_ACTION_NONE = 0,
2824    #[doc = "Report potential collision"]
2825    MAV_COLLISION_ACTION_REPORT = 1,
2826    #[doc = "Ascend or Descend to avoid threat"]
2827    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
2828    #[doc = "Move horizontally to avoid threat"]
2829    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
2830    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
2831    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
2832    #[doc = "Aircraft to fly directly back to its launch point"]
2833    MAV_COLLISION_ACTION_RTL = 5,
2834    #[doc = "Aircraft to stop in place"]
2835    MAV_COLLISION_ACTION_HOVER = 6,
2836}
2837impl MavCollisionAction {
2838    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
2839}
2840impl Default for MavCollisionAction {
2841    fn default() -> Self {
2842        Self::DEFAULT
2843    }
2844}
2845#[cfg_attr(feature = "ts", derive(TS))]
2846#[cfg_attr(feature = "ts", ts(export))]
2847#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2849#[cfg_attr(feature = "serde", serde(tag = "type"))]
2850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2851#[repr(u32)]
2852#[doc = "Source of information about this collision."]
2853pub enum MavCollisionSrc {
2854    #[doc = "ID field references ADSB_VEHICLE packets"]
2855    MAV_COLLISION_SRC_ADSB = 0,
2856    #[doc = "ID field references MAVLink SRC ID"]
2857    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
2858}
2859impl MavCollisionSrc {
2860    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
2861}
2862impl Default for MavCollisionSrc {
2863    fn default() -> Self {
2864        Self::DEFAULT
2865    }
2866}
2867#[cfg_attr(feature = "ts", derive(TS))]
2868#[cfg_attr(feature = "ts", ts(export))]
2869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2871#[cfg_attr(feature = "serde", serde(tag = "type"))]
2872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2873#[repr(u32)]
2874#[doc = "Aircraft-rated danger from this threat."]
2875pub enum MavCollisionThreatLevel {
2876    #[doc = "Not a threat"]
2877    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
2878    #[doc = "Craft is mildly concerned about this threat"]
2879    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
2880    #[doc = "Craft is panicking, and may take actions to avoid threat"]
2881    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
2882}
2883impl MavCollisionThreatLevel {
2884    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
2885}
2886impl Default for MavCollisionThreatLevel {
2887    fn default() -> Self {
2888        Self::DEFAULT
2889    }
2890}
2891#[cfg_attr(feature = "ts", derive(TS))]
2892#[cfg_attr(feature = "ts", ts(export))]
2893#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2895#[cfg_attr(feature = "serde", serde(tag = "type"))]
2896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2897#[repr(u32)]
2898#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
2899pub enum MavComponent {
2900    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
2901    MAV_COMP_ID_ALL = 0,
2902    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
2903    MAV_COMP_ID_AUTOPILOT1 = 1,
2904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2905    MAV_COMP_ID_USER1 = 25,
2906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2907    MAV_COMP_ID_USER2 = 26,
2908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2909    MAV_COMP_ID_USER3 = 27,
2910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2911    MAV_COMP_ID_USER4 = 28,
2912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2913    MAV_COMP_ID_USER5 = 29,
2914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2915    MAV_COMP_ID_USER6 = 30,
2916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2917    MAV_COMP_ID_USER7 = 31,
2918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2919    MAV_COMP_ID_USER8 = 32,
2920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2921    MAV_COMP_ID_USER9 = 33,
2922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2923    MAV_COMP_ID_USER10 = 34,
2924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2925    MAV_COMP_ID_USER11 = 35,
2926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2927    MAV_COMP_ID_USER12 = 36,
2928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2929    MAV_COMP_ID_USER13 = 37,
2930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2931    MAV_COMP_ID_USER14 = 38,
2932    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2933    MAV_COMP_ID_USER15 = 39,
2934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2935    MAV_COMP_ID_USER16 = 40,
2936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2937    MAV_COMP_ID_USER17 = 41,
2938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2939    MAV_COMP_ID_USER18 = 42,
2940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2941    MAV_COMP_ID_USER19 = 43,
2942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2943    MAV_COMP_ID_USER20 = 44,
2944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2945    MAV_COMP_ID_USER21 = 45,
2946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2947    MAV_COMP_ID_USER22 = 46,
2948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2949    MAV_COMP_ID_USER23 = 47,
2950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2951    MAV_COMP_ID_USER24 = 48,
2952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2953    MAV_COMP_ID_USER25 = 49,
2954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2955    MAV_COMP_ID_USER26 = 50,
2956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2957    MAV_COMP_ID_USER27 = 51,
2958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2959    MAV_COMP_ID_USER28 = 52,
2960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2961    MAV_COMP_ID_USER29 = 53,
2962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2963    MAV_COMP_ID_USER30 = 54,
2964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2965    MAV_COMP_ID_USER31 = 55,
2966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2967    MAV_COMP_ID_USER32 = 56,
2968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2969    MAV_COMP_ID_USER33 = 57,
2970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2971    MAV_COMP_ID_USER34 = 58,
2972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2973    MAV_COMP_ID_USER35 = 59,
2974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2975    MAV_COMP_ID_USER36 = 60,
2976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2977    MAV_COMP_ID_USER37 = 61,
2978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2979    MAV_COMP_ID_USER38 = 62,
2980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2981    MAV_COMP_ID_USER39 = 63,
2982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2983    MAV_COMP_ID_USER40 = 64,
2984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2985    MAV_COMP_ID_USER41 = 65,
2986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2987    MAV_COMP_ID_USER42 = 66,
2988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2989    MAV_COMP_ID_USER43 = 67,
2990    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
2991    MAV_COMP_ID_TELEMETRY_RADIO = 68,
2992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2993    MAV_COMP_ID_USER45 = 69,
2994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2995    MAV_COMP_ID_USER46 = 70,
2996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2997    MAV_COMP_ID_USER47 = 71,
2998    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2999    MAV_COMP_ID_USER48 = 72,
3000    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3001    MAV_COMP_ID_USER49 = 73,
3002    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3003    MAV_COMP_ID_USER50 = 74,
3004    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3005    MAV_COMP_ID_USER51 = 75,
3006    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3007    MAV_COMP_ID_USER52 = 76,
3008    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3009    MAV_COMP_ID_USER53 = 77,
3010    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3011    MAV_COMP_ID_USER54 = 78,
3012    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3013    MAV_COMP_ID_USER55 = 79,
3014    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3015    MAV_COMP_ID_USER56 = 80,
3016    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3017    MAV_COMP_ID_USER57 = 81,
3018    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3019    MAV_COMP_ID_USER58 = 82,
3020    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3021    MAV_COMP_ID_USER59 = 83,
3022    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3023    MAV_COMP_ID_USER60 = 84,
3024    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3025    MAV_COMP_ID_USER61 = 85,
3026    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3027    MAV_COMP_ID_USER62 = 86,
3028    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3029    MAV_COMP_ID_USER63 = 87,
3030    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3031    MAV_COMP_ID_USER64 = 88,
3032    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3033    MAV_COMP_ID_USER65 = 89,
3034    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3035    MAV_COMP_ID_USER66 = 90,
3036    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3037    MAV_COMP_ID_USER67 = 91,
3038    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3039    MAV_COMP_ID_USER68 = 92,
3040    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3041    MAV_COMP_ID_USER69 = 93,
3042    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3043    MAV_COMP_ID_USER70 = 94,
3044    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3045    MAV_COMP_ID_USER71 = 95,
3046    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3047    MAV_COMP_ID_USER72 = 96,
3048    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3049    MAV_COMP_ID_USER73 = 97,
3050    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3051    MAV_COMP_ID_USER74 = 98,
3052    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3053    MAV_COMP_ID_USER75 = 99,
3054    #[doc = "Camera #1."]
3055    MAV_COMP_ID_CAMERA = 100,
3056    #[doc = "Camera #2."]
3057    MAV_COMP_ID_CAMERA2 = 101,
3058    #[doc = "Camera #3."]
3059    MAV_COMP_ID_CAMERA3 = 102,
3060    #[doc = "Camera #4."]
3061    MAV_COMP_ID_CAMERA4 = 103,
3062    #[doc = "Camera #5."]
3063    MAV_COMP_ID_CAMERA5 = 104,
3064    #[doc = "Camera #6."]
3065    MAV_COMP_ID_CAMERA6 = 105,
3066    #[doc = "Servo #1."]
3067    MAV_COMP_ID_SERVO1 = 140,
3068    #[doc = "Servo #2."]
3069    MAV_COMP_ID_SERVO2 = 141,
3070    #[doc = "Servo #3."]
3071    MAV_COMP_ID_SERVO3 = 142,
3072    #[doc = "Servo #4."]
3073    MAV_COMP_ID_SERVO4 = 143,
3074    #[doc = "Servo #5."]
3075    MAV_COMP_ID_SERVO5 = 144,
3076    #[doc = "Servo #6."]
3077    MAV_COMP_ID_SERVO6 = 145,
3078    #[doc = "Servo #7."]
3079    MAV_COMP_ID_SERVO7 = 146,
3080    #[doc = "Servo #8."]
3081    MAV_COMP_ID_SERVO8 = 147,
3082    #[doc = "Servo #9."]
3083    MAV_COMP_ID_SERVO9 = 148,
3084    #[doc = "Servo #10."]
3085    MAV_COMP_ID_SERVO10 = 149,
3086    #[doc = "Servo #11."]
3087    MAV_COMP_ID_SERVO11 = 150,
3088    #[doc = "Servo #12."]
3089    MAV_COMP_ID_SERVO12 = 151,
3090    #[doc = "Servo #13."]
3091    MAV_COMP_ID_SERVO13 = 152,
3092    #[doc = "Servo #14."]
3093    MAV_COMP_ID_SERVO14 = 153,
3094    #[doc = "Gimbal #1."]
3095    MAV_COMP_ID_GIMBAL = 154,
3096    #[doc = "Logging component."]
3097    MAV_COMP_ID_LOG = 155,
3098    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
3099    MAV_COMP_ID_ADSB = 156,
3100    #[doc = "On Screen Display (OSD) devices for video links."]
3101    MAV_COMP_ID_OSD = 157,
3102    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
3103    MAV_COMP_ID_PERIPHERAL = 158,
3104    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
3105    #[doc = "Gimbal ID for QX1."]
3106    MAV_COMP_ID_QX1_GIMBAL = 159,
3107    #[doc = "FLARM collision alert component."]
3108    MAV_COMP_ID_FLARM = 160,
3109    #[doc = "Parachute component."]
3110    MAV_COMP_ID_PARACHUTE = 161,
3111    #[doc = "Winch component."]
3112    MAV_COMP_ID_WINCH = 169,
3113    #[doc = "Gimbal #2."]
3114    MAV_COMP_ID_GIMBAL2 = 171,
3115    #[doc = "Gimbal #3."]
3116    MAV_COMP_ID_GIMBAL3 = 172,
3117    #[doc = "Gimbal #4"]
3118    MAV_COMP_ID_GIMBAL4 = 173,
3119    #[doc = "Gimbal #5."]
3120    MAV_COMP_ID_GIMBAL5 = 174,
3121    #[doc = "Gimbal #6."]
3122    MAV_COMP_ID_GIMBAL6 = 175,
3123    #[doc = "Battery #1."]
3124    MAV_COMP_ID_BATTERY = 180,
3125    #[doc = "Battery #2."]
3126    MAV_COMP_ID_BATTERY2 = 181,
3127    #[doc = "CAN over MAVLink client."]
3128    MAV_COMP_ID_MAVCAN = 189,
3129    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
3130    MAV_COMP_ID_MISSIONPLANNER = 190,
3131    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3132    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
3133    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3134    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
3135    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3136    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
3137    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3138    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
3139    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
3140    MAV_COMP_ID_PATHPLANNER = 195,
3141    #[doc = "Component that plans a collision free path between two points."]
3142    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
3143    #[doc = "Component that provides position estimates using VIO techniques."]
3144    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
3145    #[doc = "Component that manages pairing of vehicle and GCS."]
3146    MAV_COMP_ID_PAIRING_MANAGER = 198,
3147    #[doc = "Inertial Measurement Unit (IMU) #1."]
3148    MAV_COMP_ID_IMU = 200,
3149    #[doc = "Inertial Measurement Unit (IMU) #2."]
3150    MAV_COMP_ID_IMU_2 = 201,
3151    #[doc = "Inertial Measurement Unit (IMU) #3."]
3152    MAV_COMP_ID_IMU_3 = 202,
3153    #[doc = "GPS #1."]
3154    MAV_COMP_ID_GPS = 220,
3155    #[doc = "GPS #2."]
3156    MAV_COMP_ID_GPS2 = 221,
3157    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
3158    MAV_COMP_ID_ODID_TXRX_1 = 236,
3159    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
3160    MAV_COMP_ID_ODID_TXRX_2 = 237,
3161    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
3162    MAV_COMP_ID_ODID_TXRX_3 = 238,
3163    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
3164    MAV_COMP_ID_UDP_BRIDGE = 240,
3165    #[doc = "Component to bridge to UART (i.e. from UDP)."]
3166    MAV_COMP_ID_UART_BRIDGE = 241,
3167    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
3168    MAV_COMP_ID_TUNNEL_NODE = 242,
3169    #[doc = "Illuminator"]
3170    MAV_COMP_ID_ILLUMINATOR = 243,
3171    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
3172    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
3173    MAV_COMP_ID_SYSTEM_CONTROL = 250,
3174}
3175impl MavComponent {
3176    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
3177}
3178impl Default for MavComponent {
3179    fn default() -> Self {
3180        Self::DEFAULT
3181    }
3182}
3183#[cfg_attr(feature = "ts", derive(TS))]
3184#[cfg_attr(feature = "ts", ts(export))]
3185#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3187#[cfg_attr(feature = "serde", serde(tag = "type"))]
3188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3189#[repr(u32)]
3190#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
3191#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
3192pub enum MavDataStream {
3193    #[doc = "Enable all data streams"]
3194    MAV_DATA_STREAM_ALL = 0,
3195    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
3196    MAV_DATA_STREAM_RAW_SENSORS = 1,
3197    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
3198    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
3199    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
3200    MAV_DATA_STREAM_RC_CHANNELS = 3,
3201    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
3202    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
3203    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
3204    MAV_DATA_STREAM_POSITION = 6,
3205    #[doc = "Dependent on the autopilot"]
3206    MAV_DATA_STREAM_EXTRA1 = 10,
3207    #[doc = "Dependent on the autopilot"]
3208    MAV_DATA_STREAM_EXTRA2 = 11,
3209    #[doc = "Dependent on the autopilot"]
3210    MAV_DATA_STREAM_EXTRA3 = 12,
3211}
3212impl MavDataStream {
3213    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
3214}
3215impl Default for MavDataStream {
3216    fn default() -> Self {
3217        Self::DEFAULT
3218    }
3219}
3220#[cfg_attr(feature = "ts", derive(TS))]
3221#[cfg_attr(feature = "ts", ts(export))]
3222#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3223#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3224#[cfg_attr(feature = "serde", serde(tag = "type"))]
3225#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3226#[repr(u32)]
3227#[doc = "Enumeration of distance sensor types"]
3228pub enum MavDistanceSensor {
3229    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
3230    MAV_DISTANCE_SENSOR_LASER = 0,
3231    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
3232    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
3233    #[doc = "Infrared rangefinder, e.g. Sharp units"]
3234    MAV_DISTANCE_SENSOR_INFRARED = 2,
3235    #[doc = "Radar type, e.g. uLanding units"]
3236    MAV_DISTANCE_SENSOR_RADAR = 3,
3237    #[doc = "Broken or unknown type, e.g. analog units"]
3238    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
3239}
3240impl MavDistanceSensor {
3241    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
3242}
3243impl Default for MavDistanceSensor {
3244    fn default() -> Self {
3245        Self::DEFAULT
3246    }
3247}
3248#[cfg_attr(feature = "ts", derive(TS))]
3249#[cfg_attr(feature = "ts", ts(export))]
3250#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3252#[cfg_attr(feature = "serde", serde(tag = "type"))]
3253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3254#[repr(u32)]
3255#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
3256pub enum MavDoRepositionFlags {
3257    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
3258    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
3259}
3260impl MavDoRepositionFlags {
3261    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
3262}
3263impl Default for MavDoRepositionFlags {
3264    fn default() -> Self {
3265        Self::DEFAULT
3266    }
3267}
3268#[cfg_attr(feature = "ts", derive(TS))]
3269#[cfg_attr(feature = "ts", ts(export))]
3270#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3272#[cfg_attr(feature = "serde", serde(tag = "type"))]
3273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3274#[repr(u32)]
3275#[doc = "Enumeration of estimator types"]
3276pub enum MavEstimatorType {
3277    #[doc = "Unknown type of the estimator."]
3278    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
3279    #[doc = "This is a naive estimator without any real covariance feedback."]
3280    MAV_ESTIMATOR_TYPE_NAIVE = 1,
3281    #[doc = "Computer vision based estimate. Might be up to scale."]
3282    MAV_ESTIMATOR_TYPE_VISION = 2,
3283    #[doc = "Visual-inertial estimate."]
3284    MAV_ESTIMATOR_TYPE_VIO = 3,
3285    #[doc = "Plain GPS estimate."]
3286    MAV_ESTIMATOR_TYPE_GPS = 4,
3287    #[doc = "Estimator integrating GPS and inertial sensing."]
3288    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
3289    #[doc = "Estimate from external motion capturing system."]
3290    MAV_ESTIMATOR_TYPE_MOCAP = 6,
3291    #[doc = "Estimator based on lidar sensor input."]
3292    MAV_ESTIMATOR_TYPE_LIDAR = 7,
3293    #[doc = "Estimator on autopilot."]
3294    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
3295}
3296impl MavEstimatorType {
3297    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
3298}
3299impl Default for MavEstimatorType {
3300    fn default() -> Self {
3301        Self::DEFAULT
3302    }
3303}
3304#[cfg_attr(feature = "ts", derive(TS))]
3305#[cfg_attr(feature = "ts", ts(export))]
3306#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3307#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3308#[cfg_attr(feature = "serde", serde(tag = "type"))]
3309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3310#[repr(u32)]
3311#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
3312pub enum MavEventCurrentSequenceFlags {
3313    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
3314    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
3315}
3316impl MavEventCurrentSequenceFlags {
3317    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
3318}
3319impl Default for MavEventCurrentSequenceFlags {
3320    fn default() -> Self {
3321        Self::DEFAULT
3322    }
3323}
3324#[cfg_attr(feature = "ts", derive(TS))]
3325#[cfg_attr(feature = "ts", ts(export))]
3326#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3328#[cfg_attr(feature = "serde", serde(tag = "type"))]
3329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3330#[repr(u32)]
3331#[doc = "Reason for an event error response."]
3332pub enum MavEventErrorReason {
3333    #[doc = "The requested event is not available (anymore)."]
3334    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
3335}
3336impl MavEventErrorReason {
3337    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
3338}
3339impl Default for MavEventErrorReason {
3340    fn default() -> Self {
3341        Self::DEFAULT
3342    }
3343}
3344#[cfg_attr(feature = "ts", derive(TS))]
3345#[cfg_attr(feature = "ts", ts(export))]
3346#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3348#[cfg_attr(feature = "serde", serde(tag = "type"))]
3349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3350#[repr(u32)]
3351#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
3352pub enum MavFrame {
3353    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
3354    MAV_FRAME_GLOBAL = 0,
3355    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
3356    MAV_FRAME_LOCAL_NED = 1,
3357    #[doc = "NOT a coordinate frame, indicates a mission command."]
3358    MAV_FRAME_MISSION = 2,
3359    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
3360    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
3361    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
3362    MAV_FRAME_LOCAL_ENU = 4,
3363    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
3364    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
3365    MAV_FRAME_GLOBAL_INT = 5,
3366    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
3367    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
3368    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
3369    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
3370    MAV_FRAME_LOCAL_OFFSET_NED = 7,
3371    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
3372    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
3373    MAV_FRAME_BODY_NED = 8,
3374    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
3375    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
3376    MAV_FRAME_BODY_OFFSET_NED = 9,
3377    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
3378    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
3379    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
3380    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
3381    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
3382    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
3383    MAV_FRAME_BODY_FRD = 12,
3384    #[deprecated = "  (Deprecated since 2019-04)"]
3385    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
3386    MAV_FRAME_RESERVED_13 = 13,
3387    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
3388    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
3389    MAV_FRAME_RESERVED_14 = 14,
3390    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
3391    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
3392    MAV_FRAME_RESERVED_15 = 15,
3393    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
3394    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
3395    MAV_FRAME_RESERVED_16 = 16,
3396    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
3397    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
3398    MAV_FRAME_RESERVED_17 = 17,
3399    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
3400    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
3401    MAV_FRAME_RESERVED_18 = 18,
3402    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
3403    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
3404    MAV_FRAME_RESERVED_19 = 19,
3405    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
3406    MAV_FRAME_LOCAL_FRD = 20,
3407    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
3408    MAV_FRAME_LOCAL_FLU = 21,
3409}
3410impl MavFrame {
3411    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
3412}
3413impl Default for MavFrame {
3414    fn default() -> Self {
3415        Self::DEFAULT
3416    }
3417}
3418#[cfg_attr(feature = "ts", derive(TS))]
3419#[cfg_attr(feature = "ts", ts(export))]
3420#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3422#[cfg_attr(feature = "serde", serde(tag = "type"))]
3423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3424#[repr(u32)]
3425#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
3426pub enum MavFtpErr {
3427    #[doc = "None: No error"]
3428    MAV_FTP_ERR_NONE = 0,
3429    #[doc = "Fail: Unknown failure"]
3430    MAV_FTP_ERR_FAIL = 1,
3431    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
3432    MAV_FTP_ERR_FAILERRNO = 2,
3433    #[doc = "InvalidDataSize: Payload size is invalid"]
3434    MAV_FTP_ERR_INVALIDDATASIZE = 3,
3435    #[doc = "InvalidSession: Session is not currently open"]
3436    MAV_FTP_ERR_INVALIDSESSION = 4,
3437    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
3438    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
3439    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
3440    MAV_FTP_ERR_EOF = 6,
3441    #[doc = "UnknownCommand: Unknown command / opcode"]
3442    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
3443    #[doc = "FileExists: File/directory already exists"]
3444    MAV_FTP_ERR_FILEEXISTS = 8,
3445    #[doc = "FileProtected: File/directory is write protected"]
3446    MAV_FTP_ERR_FILEPROTECTED = 9,
3447    #[doc = "FileNotFound: File/directory not found"]
3448    MAV_FTP_ERR_FILENOTFOUND = 10,
3449}
3450impl MavFtpErr {
3451    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
3452}
3453impl Default for MavFtpErr {
3454    fn default() -> Self {
3455        Self::DEFAULT
3456    }
3457}
3458#[cfg_attr(feature = "ts", derive(TS))]
3459#[cfg_attr(feature = "ts", ts(export))]
3460#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3462#[cfg_attr(feature = "serde", serde(tag = "type"))]
3463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3464#[repr(u32)]
3465#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
3466pub enum MavFtpOpcode {
3467    #[doc = "None. Ignored, always ACKed"]
3468    MAV_FTP_OPCODE_NONE = 0,
3469    #[doc = "TerminateSession: Terminates open Read session"]
3470    MAV_FTP_OPCODE_TERMINATESESSION = 1,
3471    #[doc = "ResetSessions: Terminates all open read sessions"]
3472    MAV_FTP_OPCODE_RESETSESSION = 2,
3473    #[doc = "ListDirectory. List files and directories in path from offset"]
3474    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
3475    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
3476    MAV_FTP_OPCODE_OPENFILERO = 4,
3477    #[doc = "ReadFile: Reads size bytes from offset in session"]
3478    MAV_FTP_OPCODE_READFILE = 5,
3479    #[doc = "CreateFile: Creates file at path for writing, returns session"]
3480    MAV_FTP_OPCODE_CREATEFILE = 6,
3481    #[doc = "WriteFile: Writes size bytes to offset in session"]
3482    MAV_FTP_OPCODE_WRITEFILE = 7,
3483    #[doc = "RemoveFile: Remove file at path"]
3484    MAV_FTP_OPCODE_REMOVEFILE = 8,
3485    #[doc = "CreateDirectory: Creates directory at path"]
3486    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
3487    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
3488    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
3489    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
3490    MAV_FTP_OPCODE_OPENFILEWO = 11,
3491    #[doc = "TruncateFile: Truncate file at path to offset length"]
3492    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
3493    #[doc = "Rename: Rename path1 to path2"]
3494    MAV_FTP_OPCODE_RENAME = 13,
3495    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
3496    MAV_FTP_OPCODE_CALCFILECRC = 14,
3497    #[doc = "BurstReadFile: Burst download session file"]
3498    MAV_FTP_OPCODE_BURSTREADFILE = 15,
3499    #[doc = "ACK: ACK response"]
3500    MAV_FTP_OPCODE_ACK = 128,
3501    #[doc = "NAK: NAK response"]
3502    MAV_FTP_OPCODE_NAK = 129,
3503}
3504impl MavFtpOpcode {
3505    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
3506}
3507impl Default for MavFtpOpcode {
3508    fn default() -> Self {
3509        Self::DEFAULT
3510    }
3511}
3512#[cfg_attr(feature = "ts", derive(TS))]
3513#[cfg_attr(feature = "ts", ts(export))]
3514#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3516#[cfg_attr(feature = "serde", serde(tag = "type"))]
3517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3518#[repr(u32)]
3519#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
3520pub enum MavFuelType {
3521    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
3522    MAV_FUEL_TYPE_UNKNOWN = 0,
3523    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
3524    MAV_FUEL_TYPE_LIQUID = 1,
3525    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
3526    MAV_FUEL_TYPE_GAS = 2,
3527}
3528impl MavFuelType {
3529    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
3530}
3531impl Default for MavFuelType {
3532    fn default() -> Self {
3533        Self::DEFAULT
3534    }
3535}
3536bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
3537impl MavGeneratorStatusFlag {
3538    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
3539}
3540impl Default for MavGeneratorStatusFlag {
3541    fn default() -> Self {
3542        Self::DEFAULT
3543    }
3544}
3545#[cfg_attr(feature = "ts", derive(TS))]
3546#[cfg_attr(feature = "ts", ts(export))]
3547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3549#[cfg_attr(feature = "serde", serde(tag = "type"))]
3550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3551#[repr(u32)]
3552#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
3553pub enum MavGoto {
3554    #[doc = "Hold at the current position."]
3555    MAV_GOTO_DO_HOLD = 0,
3556    #[doc = "Continue with the next item in mission execution."]
3557    MAV_GOTO_DO_CONTINUE = 1,
3558    #[doc = "Hold at the current position of the system"]
3559    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
3560    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
3561    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
3562}
3563impl MavGoto {
3564    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
3565}
3566impl Default for MavGoto {
3567    fn default() -> Self {
3568        Self::DEFAULT
3569    }
3570}
3571#[cfg_attr(feature = "ts", derive(TS))]
3572#[cfg_attr(feature = "ts", ts(export))]
3573#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3575#[cfg_attr(feature = "serde", serde(tag = "type"))]
3576#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3577#[repr(u32)]
3578#[doc = "Enumeration of landed detector states"]
3579pub enum MavLandedState {
3580    #[doc = "MAV landed state is unknown"]
3581    MAV_LANDED_STATE_UNDEFINED = 0,
3582    #[doc = "MAV is landed (on ground)"]
3583    MAV_LANDED_STATE_ON_GROUND = 1,
3584    #[doc = "MAV is in air"]
3585    MAV_LANDED_STATE_IN_AIR = 2,
3586    #[doc = "MAV currently taking off"]
3587    MAV_LANDED_STATE_TAKEOFF = 3,
3588    #[doc = "MAV currently landing"]
3589    MAV_LANDED_STATE_LANDING = 4,
3590}
3591impl MavLandedState {
3592    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
3593}
3594impl Default for MavLandedState {
3595    fn default() -> Self {
3596        Self::DEFAULT
3597    }
3598}
3599#[cfg_attr(feature = "ts", derive(TS))]
3600#[cfg_attr(feature = "ts", ts(export))]
3601#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3603#[cfg_attr(feature = "serde", serde(tag = "type"))]
3604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3605#[repr(u32)]
3606#[doc = "Result of mission operation (in a MISSION_ACK message)."]
3607pub enum MavMissionResult {
3608    #[doc = "mission accepted OK"]
3609    MAV_MISSION_ACCEPTED = 0,
3610    #[doc = "Generic error / not accepting mission commands at all right now."]
3611    MAV_MISSION_ERROR = 1,
3612    #[doc = "Coordinate frame is not supported."]
3613    MAV_MISSION_UNSUPPORTED_FRAME = 2,
3614    #[doc = "Command is not supported."]
3615    MAV_MISSION_UNSUPPORTED = 3,
3616    #[doc = "Mission items exceed storage space."]
3617    MAV_MISSION_NO_SPACE = 4,
3618    #[doc = "One of the parameters has an invalid value."]
3619    MAV_MISSION_INVALID = 5,
3620    #[doc = "param1 has an invalid value."]
3621    MAV_MISSION_INVALID_PARAM1 = 6,
3622    #[doc = "param2 has an invalid value."]
3623    MAV_MISSION_INVALID_PARAM2 = 7,
3624    #[doc = "param3 has an invalid value."]
3625    MAV_MISSION_INVALID_PARAM3 = 8,
3626    #[doc = "param4 has an invalid value."]
3627    MAV_MISSION_INVALID_PARAM4 = 9,
3628    #[doc = "x / param5 has an invalid value."]
3629    MAV_MISSION_INVALID_PARAM5_X = 10,
3630    #[doc = "y / param6 has an invalid value."]
3631    MAV_MISSION_INVALID_PARAM6_Y = 11,
3632    #[doc = "z / param7 has an invalid value."]
3633    MAV_MISSION_INVALID_PARAM7 = 12,
3634    #[doc = "Mission item received out of sequence"]
3635    MAV_MISSION_INVALID_SEQUENCE = 13,
3636    #[doc = "Not accepting any mission commands from this communication partner."]
3637    MAV_MISSION_DENIED = 14,
3638    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
3639    MAV_MISSION_OPERATION_CANCELLED = 15,
3640}
3641impl MavMissionResult {
3642    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
3643}
3644impl Default for MavMissionResult {
3645    fn default() -> Self {
3646        Self::DEFAULT
3647    }
3648}
3649#[cfg_attr(feature = "ts", derive(TS))]
3650#[cfg_attr(feature = "ts", ts(export))]
3651#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3652#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3653#[cfg_attr(feature = "serde", serde(tag = "type"))]
3654#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3655#[repr(u32)]
3656#[doc = "Type of mission items being requested/sent in mission protocol."]
3657pub enum MavMissionType {
3658    #[doc = "Items are mission commands for main mission."]
3659    MAV_MISSION_TYPE_MISSION = 0,
3660    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
3661    MAV_MISSION_TYPE_FENCE = 1,
3662    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
3663    MAV_MISSION_TYPE_RALLY = 2,
3664    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
3665    MAV_MISSION_TYPE_ALL = 255,
3666}
3667impl MavMissionType {
3668    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
3669}
3670impl Default for MavMissionType {
3671    fn default() -> Self {
3672        Self::DEFAULT
3673    }
3674}
3675#[cfg_attr(feature = "ts", derive(TS))]
3676#[cfg_attr(feature = "ts", ts(export))]
3677#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3678#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3679#[cfg_attr(feature = "serde", serde(tag = "type"))]
3680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3681#[repr(u32)]
3682#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
3683pub enum MavMode {
3684    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
3685    MAV_MODE_PREFLIGHT = 0,
3686    #[doc = "System is allowed to be active, under assisted RC control."]
3687    MAV_MODE_STABILIZE_DISARMED = 80,
3688    #[doc = "System is allowed to be active, under assisted RC control."]
3689    MAV_MODE_STABILIZE_ARMED = 208,
3690    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
3691    MAV_MODE_MANUAL_DISARMED = 64,
3692    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
3693    MAV_MODE_MANUAL_ARMED = 192,
3694    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
3695    MAV_MODE_GUIDED_DISARMED = 88,
3696    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
3697    MAV_MODE_GUIDED_ARMED = 216,
3698    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
3699    MAV_MODE_AUTO_DISARMED = 92,
3700    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
3701    MAV_MODE_AUTO_ARMED = 220,
3702    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
3703    MAV_MODE_TEST_DISARMED = 66,
3704    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
3705    MAV_MODE_TEST_ARMED = 194,
3706}
3707impl MavMode {
3708    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
3709}
3710impl Default for MavMode {
3711    fn default() -> Self {
3712        Self::DEFAULT
3713    }
3714}
3715bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
3716impl MavModeFlag {
3717    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
3718}
3719impl Default for MavModeFlag {
3720    fn default() -> Self {
3721        Self::DEFAULT
3722    }
3723}
3724#[cfg_attr(feature = "ts", derive(TS))]
3725#[cfg_attr(feature = "ts", ts(export))]
3726#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3728#[cfg_attr(feature = "serde", serde(tag = "type"))]
3729#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3730#[repr(u32)]
3731#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
3732pub enum MavModeFlagDecodePosition {
3733    #[doc = "First bit:  10000000"]
3734    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
3735    #[doc = "Second bit: 01000000"]
3736    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
3737    #[doc = "Third bit:  00100000"]
3738    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
3739    #[doc = "Fourth bit: 00010000"]
3740    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
3741    #[doc = "Fifth bit:  00001000"]
3742    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
3743    #[doc = "Sixth bit:   00000100"]
3744    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
3745    #[doc = "Seventh bit: 00000010"]
3746    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
3747    #[doc = "Eighth bit: 00000001"]
3748    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
3749}
3750impl MavModeFlagDecodePosition {
3751    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
3752}
3753impl Default for MavModeFlagDecodePosition {
3754    fn default() -> Self {
3755        Self::DEFAULT
3756    }
3757}
3758#[cfg_attr(feature = "ts", derive(TS))]
3759#[cfg_attr(feature = "ts", ts(export))]
3760#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3762#[cfg_attr(feature = "serde", serde(tag = "type"))]
3763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3764#[repr(u32)]
3765pub enum MavModeGimbal {
3766    #[doc = "Gimbal is powered on but has not started initializing yet."]
3767    MAV_MODE_GIMBAL_UNINITIALIZED = 0,
3768    #[doc = "Gimbal is currently running calibration on the pitch axis."]
3769    MAV_MODE_GIMBAL_CALIBRATING_PITCH = 1,
3770    #[doc = "Gimbal is currently running calibration on the roll axis."]
3771    MAV_MODE_GIMBAL_CALIBRATING_ROLL = 2,
3772    #[doc = "Gimbal is currently running calibration on the yaw axis."]
3773    MAV_MODE_GIMBAL_CALIBRATING_YAW = 3,
3774    #[doc = "Gimbal has finished calibrating and initializing, but is relaxed pending reception of first rate command from copter."]
3775    MAV_MODE_GIMBAL_INITIALIZED = 4,
3776    #[doc = "Gimbal is actively stabilizing."]
3777    MAV_MODE_GIMBAL_ACTIVE = 5,
3778    #[doc = "Gimbal is relaxed because it missed more than 10 expected rate command messages in a row. Gimbal will move back to active mode when it receives a new rate command."]
3779    MAV_MODE_GIMBAL_RATE_CMD_TIMEOUT = 6,
3780}
3781impl MavModeGimbal {
3782    pub const DEFAULT: Self = Self::MAV_MODE_GIMBAL_UNINITIALIZED;
3783}
3784impl Default for MavModeGimbal {
3785    fn default() -> Self {
3786        Self::DEFAULT
3787    }
3788}
3789bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
3790impl MavModeProperty {
3791    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
3792}
3793impl Default for MavModeProperty {
3794    fn default() -> Self {
3795        Self::DEFAULT
3796    }
3797}
3798#[cfg_attr(feature = "ts", derive(TS))]
3799#[cfg_attr(feature = "ts", ts(export))]
3800#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3802#[cfg_attr(feature = "serde", serde(tag = "type"))]
3803#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3804#[repr(u32)]
3805#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
3806#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
3807pub enum MavMountMode {
3808    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
3809    MAV_MOUNT_MODE_RETRACT = 0,
3810    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
3811    MAV_MOUNT_MODE_NEUTRAL = 1,
3812    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
3813    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
3814    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
3815    MAV_MOUNT_MODE_RC_TARGETING = 3,
3816    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
3817    MAV_MOUNT_MODE_GPS_POINT = 4,
3818    #[doc = "Gimbal tracks system with specified system ID"]
3819    MAV_MOUNT_MODE_SYSID_TARGET = 5,
3820    #[doc = "Gimbal tracks home position"]
3821    MAV_MOUNT_MODE_HOME_LOCATION = 6,
3822}
3823impl MavMountMode {
3824    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
3825}
3826impl Default for MavMountMode {
3827    fn default() -> Self {
3828        Self::DEFAULT
3829    }
3830}
3831#[cfg_attr(feature = "ts", derive(TS))]
3832#[cfg_attr(feature = "ts", ts(export))]
3833#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3835#[cfg_attr(feature = "serde", serde(tag = "type"))]
3836#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3837#[repr(u32)]
3838pub enum MavOdidArmStatus {
3839    #[doc = "Passing arming checks."]
3840    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
3841    #[doc = "Generic arming failure, see error string for details."]
3842    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
3843}
3844impl MavOdidArmStatus {
3845    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
3846}
3847impl Default for MavOdidArmStatus {
3848    fn default() -> Self {
3849        Self::DEFAULT
3850    }
3851}
3852#[cfg_attr(feature = "ts", derive(TS))]
3853#[cfg_attr(feature = "ts", ts(export))]
3854#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3856#[cfg_attr(feature = "serde", serde(tag = "type"))]
3857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3858#[repr(u32)]
3859pub enum MavOdidAuthType {
3860    #[doc = "No authentication type is specified."]
3861    MAV_ODID_AUTH_TYPE_NONE = 0,
3862    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
3863    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
3864    #[doc = "Signature for the Operator ID."]
3865    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
3866    #[doc = "Signature for the entire message set."]
3867    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
3868    #[doc = "Authentication is provided by Network Remote ID."]
3869    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
3870    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
3871    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
3872}
3873impl MavOdidAuthType {
3874    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
3875}
3876impl Default for MavOdidAuthType {
3877    fn default() -> Self {
3878        Self::DEFAULT
3879    }
3880}
3881#[cfg_attr(feature = "ts", derive(TS))]
3882#[cfg_attr(feature = "ts", ts(export))]
3883#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3884#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3885#[cfg_attr(feature = "serde", serde(tag = "type"))]
3886#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3887#[repr(u32)]
3888pub enum MavOdidCategoryEu {
3889    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
3890    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
3891    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
3892    MAV_ODID_CATEGORY_EU_OPEN = 1,
3893    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
3894    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
3895    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
3896    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
3897}
3898impl MavOdidCategoryEu {
3899    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
3900}
3901impl Default for MavOdidCategoryEu {
3902    fn default() -> Self {
3903        Self::DEFAULT
3904    }
3905}
3906#[cfg_attr(feature = "ts", derive(TS))]
3907#[cfg_attr(feature = "ts", ts(export))]
3908#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3910#[cfg_attr(feature = "serde", serde(tag = "type"))]
3911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3912#[repr(u32)]
3913pub enum MavOdidClassEu {
3914    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
3915    MAV_ODID_CLASS_EU_UNDECLARED = 0,
3916    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
3917    MAV_ODID_CLASS_EU_CLASS_0 = 1,
3918    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
3919    MAV_ODID_CLASS_EU_CLASS_1 = 2,
3920    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
3921    MAV_ODID_CLASS_EU_CLASS_2 = 3,
3922    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
3923    MAV_ODID_CLASS_EU_CLASS_3 = 4,
3924    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
3925    MAV_ODID_CLASS_EU_CLASS_4 = 5,
3926    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
3927    MAV_ODID_CLASS_EU_CLASS_5 = 6,
3928    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
3929    MAV_ODID_CLASS_EU_CLASS_6 = 7,
3930}
3931impl MavOdidClassEu {
3932    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
3933}
3934impl Default for MavOdidClassEu {
3935    fn default() -> Self {
3936        Self::DEFAULT
3937    }
3938}
3939#[cfg_attr(feature = "ts", derive(TS))]
3940#[cfg_attr(feature = "ts", ts(export))]
3941#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3943#[cfg_attr(feature = "serde", serde(tag = "type"))]
3944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3945#[repr(u32)]
3946pub enum MavOdidClassificationType {
3947    #[doc = "The classification type for the UA is undeclared."]
3948    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
3949    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
3950    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
3951}
3952impl MavOdidClassificationType {
3953    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
3954}
3955impl Default for MavOdidClassificationType {
3956    fn default() -> Self {
3957        Self::DEFAULT
3958    }
3959}
3960#[cfg_attr(feature = "ts", derive(TS))]
3961#[cfg_attr(feature = "ts", ts(export))]
3962#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3964#[cfg_attr(feature = "serde", serde(tag = "type"))]
3965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3966#[repr(u32)]
3967pub enum MavOdidDescType {
3968    #[doc = "Optional free-form text description of the purpose of the flight."]
3969    MAV_ODID_DESC_TYPE_TEXT = 0,
3970    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
3971    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
3972    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
3973    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
3974}
3975impl MavOdidDescType {
3976    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
3977}
3978impl Default for MavOdidDescType {
3979    fn default() -> Self {
3980        Self::DEFAULT
3981    }
3982}
3983#[cfg_attr(feature = "ts", derive(TS))]
3984#[cfg_attr(feature = "ts", ts(export))]
3985#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3987#[cfg_attr(feature = "serde", serde(tag = "type"))]
3988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3989#[repr(u32)]
3990pub enum MavOdidHeightRef {
3991    #[doc = "The height field is relative to the take-off location."]
3992    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
3993    #[doc = "The height field is relative to ground."]
3994    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
3995}
3996impl MavOdidHeightRef {
3997    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
3998}
3999impl Default for MavOdidHeightRef {
4000    fn default() -> Self {
4001        Self::DEFAULT
4002    }
4003}
4004#[cfg_attr(feature = "ts", derive(TS))]
4005#[cfg_attr(feature = "ts", ts(export))]
4006#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4008#[cfg_attr(feature = "serde", serde(tag = "type"))]
4009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4010#[repr(u32)]
4011pub enum MavOdidHorAcc {
4012    #[doc = "The horizontal accuracy is unknown."]
4013    MAV_ODID_HOR_ACC_UNKNOWN = 0,
4014    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
4015    MAV_ODID_HOR_ACC_10NM = 1,
4016    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
4017    MAV_ODID_HOR_ACC_4NM = 2,
4018    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
4019    MAV_ODID_HOR_ACC_2NM = 3,
4020    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
4021    MAV_ODID_HOR_ACC_1NM = 4,
4022    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
4023    MAV_ODID_HOR_ACC_0_5NM = 5,
4024    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
4025    MAV_ODID_HOR_ACC_0_3NM = 6,
4026    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
4027    MAV_ODID_HOR_ACC_0_1NM = 7,
4028    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
4029    MAV_ODID_HOR_ACC_0_05NM = 8,
4030    #[doc = "The horizontal accuracy is smaller than 30 meter."]
4031    MAV_ODID_HOR_ACC_30_METER = 9,
4032    #[doc = "The horizontal accuracy is smaller than 10 meter."]
4033    MAV_ODID_HOR_ACC_10_METER = 10,
4034    #[doc = "The horizontal accuracy is smaller than 3 meter."]
4035    MAV_ODID_HOR_ACC_3_METER = 11,
4036    #[doc = "The horizontal accuracy is smaller than 1 meter."]
4037    MAV_ODID_HOR_ACC_1_METER = 12,
4038}
4039impl MavOdidHorAcc {
4040    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
4041}
4042impl Default for MavOdidHorAcc {
4043    fn default() -> Self {
4044        Self::DEFAULT
4045    }
4046}
4047#[cfg_attr(feature = "ts", derive(TS))]
4048#[cfg_attr(feature = "ts", ts(export))]
4049#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4050#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4051#[cfg_attr(feature = "serde", serde(tag = "type"))]
4052#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4053#[repr(u32)]
4054pub enum MavOdidIdType {
4055    #[doc = "No type defined."]
4056    MAV_ODID_ID_TYPE_NONE = 0,
4057    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
4058    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
4059    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
4060    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
4061    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
4062    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
4063    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
4064    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
4065}
4066impl MavOdidIdType {
4067    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
4068}
4069impl Default for MavOdidIdType {
4070    fn default() -> Self {
4071        Self::DEFAULT
4072    }
4073}
4074#[cfg_attr(feature = "ts", derive(TS))]
4075#[cfg_attr(feature = "ts", ts(export))]
4076#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4078#[cfg_attr(feature = "serde", serde(tag = "type"))]
4079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4080#[repr(u32)]
4081pub enum MavOdidOperatorIdType {
4082    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
4083    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
4084}
4085impl MavOdidOperatorIdType {
4086    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
4087}
4088impl Default for MavOdidOperatorIdType {
4089    fn default() -> Self {
4090        Self::DEFAULT
4091    }
4092}
4093#[cfg_attr(feature = "ts", derive(TS))]
4094#[cfg_attr(feature = "ts", ts(export))]
4095#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4096#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4097#[cfg_attr(feature = "serde", serde(tag = "type"))]
4098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4099#[repr(u32)]
4100pub enum MavOdidOperatorLocationType {
4101    #[doc = "The location/altitude of the operator is the same as the take-off location."]
4102    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
4103    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
4104    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
4105    #[doc = "The location/altitude of the operator are fixed values."]
4106    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
4107}
4108impl MavOdidOperatorLocationType {
4109    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
4110}
4111impl Default for MavOdidOperatorLocationType {
4112    fn default() -> Self {
4113        Self::DEFAULT
4114    }
4115}
4116#[cfg_attr(feature = "ts", derive(TS))]
4117#[cfg_attr(feature = "ts", ts(export))]
4118#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4119#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4120#[cfg_attr(feature = "serde", serde(tag = "type"))]
4121#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4122#[repr(u32)]
4123pub enum MavOdidSpeedAcc {
4124    #[doc = "The speed accuracy is unknown."]
4125    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
4126    #[doc = "The speed accuracy is smaller than 10 meters per second."]
4127    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
4128    #[doc = "The speed accuracy is smaller than 3 meters per second."]
4129    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
4130    #[doc = "The speed accuracy is smaller than 1 meters per second."]
4131    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
4132    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
4133    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
4134}
4135impl MavOdidSpeedAcc {
4136    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
4137}
4138impl Default for MavOdidSpeedAcc {
4139    fn default() -> Self {
4140        Self::DEFAULT
4141    }
4142}
4143#[cfg_attr(feature = "ts", derive(TS))]
4144#[cfg_attr(feature = "ts", ts(export))]
4145#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4147#[cfg_attr(feature = "serde", serde(tag = "type"))]
4148#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4149#[repr(u32)]
4150pub enum MavOdidStatus {
4151    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
4152    MAV_ODID_STATUS_UNDECLARED = 0,
4153    #[doc = "The UA is on the ground."]
4154    MAV_ODID_STATUS_GROUND = 1,
4155    #[doc = "The UA is in the air."]
4156    MAV_ODID_STATUS_AIRBORNE = 2,
4157    #[doc = "The UA is having an emergency."]
4158    MAV_ODID_STATUS_EMERGENCY = 3,
4159    #[doc = "The remote ID system is failing or unreliable in some way."]
4160    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
4161}
4162impl MavOdidStatus {
4163    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
4164}
4165impl Default for MavOdidStatus {
4166    fn default() -> Self {
4167        Self::DEFAULT
4168    }
4169}
4170#[cfg_attr(feature = "ts", derive(TS))]
4171#[cfg_attr(feature = "ts", ts(export))]
4172#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4174#[cfg_attr(feature = "serde", serde(tag = "type"))]
4175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4176#[repr(u32)]
4177pub enum MavOdidTimeAcc {
4178    #[doc = "The timestamp accuracy is unknown."]
4179    MAV_ODID_TIME_ACC_UNKNOWN = 0,
4180    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
4181    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
4182    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
4183    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
4184    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
4185    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
4186    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
4187    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
4188    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
4189    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
4190    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
4191    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
4192    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
4193    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
4194    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
4195    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
4196    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
4197    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
4198    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
4199    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
4200    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
4201    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
4202    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
4203    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
4204    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
4205    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
4206    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
4207    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
4208    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
4209    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
4210}
4211impl MavOdidTimeAcc {
4212    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
4213}
4214impl Default for MavOdidTimeAcc {
4215    fn default() -> Self {
4216        Self::DEFAULT
4217    }
4218}
4219#[cfg_attr(feature = "ts", derive(TS))]
4220#[cfg_attr(feature = "ts", ts(export))]
4221#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4223#[cfg_attr(feature = "serde", serde(tag = "type"))]
4224#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4225#[repr(u32)]
4226pub enum MavOdidUaType {
4227    #[doc = "No UA (Unmanned Aircraft) type defined."]
4228    MAV_ODID_UA_TYPE_NONE = 0,
4229    #[doc = "Aeroplane/Airplane. Fixed wing."]
4230    MAV_ODID_UA_TYPE_AEROPLANE = 1,
4231    #[doc = "Helicopter or multirotor."]
4232    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
4233    #[doc = "Gyroplane."]
4234    MAV_ODID_UA_TYPE_GYROPLANE = 3,
4235    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
4236    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
4237    #[doc = "Ornithopter."]
4238    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
4239    #[doc = "Glider."]
4240    MAV_ODID_UA_TYPE_GLIDER = 6,
4241    #[doc = "Kite."]
4242    MAV_ODID_UA_TYPE_KITE = 7,
4243    #[doc = "Free Balloon."]
4244    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
4245    #[doc = "Captive Balloon."]
4246    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
4247    #[doc = "Airship. E.g. a blimp."]
4248    MAV_ODID_UA_TYPE_AIRSHIP = 10,
4249    #[doc = "Free Fall/Parachute (unpowered)."]
4250    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
4251    #[doc = "Rocket."]
4252    MAV_ODID_UA_TYPE_ROCKET = 12,
4253    #[doc = "Tethered powered aircraft."]
4254    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
4255    #[doc = "Ground Obstacle."]
4256    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
4257    #[doc = "Other type of aircraft not listed earlier."]
4258    MAV_ODID_UA_TYPE_OTHER = 15,
4259}
4260impl MavOdidUaType {
4261    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
4262}
4263impl Default for MavOdidUaType {
4264    fn default() -> Self {
4265        Self::DEFAULT
4266    }
4267}
4268#[cfg_attr(feature = "ts", derive(TS))]
4269#[cfg_attr(feature = "ts", ts(export))]
4270#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4272#[cfg_attr(feature = "serde", serde(tag = "type"))]
4273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4274#[repr(u32)]
4275pub enum MavOdidVerAcc {
4276    #[doc = "The vertical accuracy is unknown."]
4277    MAV_ODID_VER_ACC_UNKNOWN = 0,
4278    #[doc = "The vertical accuracy is smaller than 150 meter."]
4279    MAV_ODID_VER_ACC_150_METER = 1,
4280    #[doc = "The vertical accuracy is smaller than 45 meter."]
4281    MAV_ODID_VER_ACC_45_METER = 2,
4282    #[doc = "The vertical accuracy is smaller than 25 meter."]
4283    MAV_ODID_VER_ACC_25_METER = 3,
4284    #[doc = "The vertical accuracy is smaller than 10 meter."]
4285    MAV_ODID_VER_ACC_10_METER = 4,
4286    #[doc = "The vertical accuracy is smaller than 3 meter."]
4287    MAV_ODID_VER_ACC_3_METER = 5,
4288    #[doc = "The vertical accuracy is smaller than 1 meter."]
4289    MAV_ODID_VER_ACC_1_METER = 6,
4290}
4291impl MavOdidVerAcc {
4292    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
4293}
4294impl Default for MavOdidVerAcc {
4295    fn default() -> Self {
4296        Self::DEFAULT
4297    }
4298}
4299#[cfg_attr(feature = "ts", derive(TS))]
4300#[cfg_attr(feature = "ts", ts(export))]
4301#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4302#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4303#[cfg_attr(feature = "serde", serde(tag = "type"))]
4304#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4305#[repr(u32)]
4306#[doc = "Specifies the datatype of a MAVLink extended parameter."]
4307pub enum MavParamExtType {
4308    #[doc = "8-bit unsigned integer"]
4309    MAV_PARAM_EXT_TYPE_UINT8 = 1,
4310    #[doc = "8-bit signed integer"]
4311    MAV_PARAM_EXT_TYPE_INT8 = 2,
4312    #[doc = "16-bit unsigned integer"]
4313    MAV_PARAM_EXT_TYPE_UINT16 = 3,
4314    #[doc = "16-bit signed integer"]
4315    MAV_PARAM_EXT_TYPE_INT16 = 4,
4316    #[doc = "32-bit unsigned integer"]
4317    MAV_PARAM_EXT_TYPE_UINT32 = 5,
4318    #[doc = "32-bit signed integer"]
4319    MAV_PARAM_EXT_TYPE_INT32 = 6,
4320    #[doc = "64-bit unsigned integer"]
4321    MAV_PARAM_EXT_TYPE_UINT64 = 7,
4322    #[doc = "64-bit signed integer"]
4323    MAV_PARAM_EXT_TYPE_INT64 = 8,
4324    #[doc = "32-bit floating-point"]
4325    MAV_PARAM_EXT_TYPE_REAL32 = 9,
4326    #[doc = "64-bit floating-point"]
4327    MAV_PARAM_EXT_TYPE_REAL64 = 10,
4328    #[doc = "Custom Type"]
4329    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
4330}
4331impl MavParamExtType {
4332    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
4333}
4334impl Default for MavParamExtType {
4335    fn default() -> Self {
4336        Self::DEFAULT
4337    }
4338}
4339#[cfg_attr(feature = "ts", derive(TS))]
4340#[cfg_attr(feature = "ts", ts(export))]
4341#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4343#[cfg_attr(feature = "serde", serde(tag = "type"))]
4344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4345#[repr(u32)]
4346#[doc = "Specifies the datatype of a MAVLink parameter."]
4347pub enum MavParamType {
4348    #[doc = "8-bit unsigned integer"]
4349    MAV_PARAM_TYPE_UINT8 = 1,
4350    #[doc = "8-bit signed integer"]
4351    MAV_PARAM_TYPE_INT8 = 2,
4352    #[doc = "16-bit unsigned integer"]
4353    MAV_PARAM_TYPE_UINT16 = 3,
4354    #[doc = "16-bit signed integer"]
4355    MAV_PARAM_TYPE_INT16 = 4,
4356    #[doc = "32-bit unsigned integer"]
4357    MAV_PARAM_TYPE_UINT32 = 5,
4358    #[doc = "32-bit signed integer"]
4359    MAV_PARAM_TYPE_INT32 = 6,
4360    #[doc = "64-bit unsigned integer"]
4361    MAV_PARAM_TYPE_UINT64 = 7,
4362    #[doc = "64-bit signed integer"]
4363    MAV_PARAM_TYPE_INT64 = 8,
4364    #[doc = "32-bit floating-point"]
4365    MAV_PARAM_TYPE_REAL32 = 9,
4366    #[doc = "64-bit floating-point"]
4367    MAV_PARAM_TYPE_REAL64 = 10,
4368}
4369impl MavParamType {
4370    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
4371}
4372impl Default for MavParamType {
4373    fn default() -> Self {
4374        Self::DEFAULT
4375    }
4376}
4377bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
4378impl MavPowerStatus {
4379    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
4380}
4381impl Default for MavPowerStatus {
4382    fn default() -> Self {
4383        Self::DEFAULT
4384    }
4385}
4386bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
4387impl MavProtocolCapability {
4388    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
4389}
4390impl Default for MavProtocolCapability {
4391    fn default() -> Self {
4392        Self::DEFAULT
4393    }
4394}
4395#[cfg_attr(feature = "ts", derive(TS))]
4396#[cfg_attr(feature = "ts", ts(export))]
4397#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4398#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4399#[cfg_attr(feature = "serde", serde(tag = "type"))]
4400#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4401#[repr(u32)]
4402#[doc = "Special ACK block numbers control activation of dataflash log streaming."]
4403pub enum MavRemoteLogDataBlockCommands {
4404    #[doc = "UAV to stop sending DataFlash blocks."]
4405    MAV_REMOTE_LOG_DATA_BLOCK_STOP = 2147483645,
4406    #[doc = "UAV to start sending DataFlash blocks."]
4407    MAV_REMOTE_LOG_DATA_BLOCK_START = 2147483646,
4408}
4409impl MavRemoteLogDataBlockCommands {
4410    pub const DEFAULT: Self = Self::MAV_REMOTE_LOG_DATA_BLOCK_STOP;
4411}
4412impl Default for MavRemoteLogDataBlockCommands {
4413    fn default() -> Self {
4414        Self::DEFAULT
4415    }
4416}
4417#[cfg_attr(feature = "ts", derive(TS))]
4418#[cfg_attr(feature = "ts", ts(export))]
4419#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4421#[cfg_attr(feature = "serde", serde(tag = "type"))]
4422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4423#[repr(u32)]
4424#[doc = "Possible remote log data block statuses."]
4425pub enum MavRemoteLogDataBlockStatuses {
4426    #[doc = "This block has NOT been received."]
4427    MAV_REMOTE_LOG_DATA_BLOCK_NACK = 0,
4428    #[doc = "This block has been received."]
4429    MAV_REMOTE_LOG_DATA_BLOCK_ACK = 1,
4430}
4431impl MavRemoteLogDataBlockStatuses {
4432    pub const DEFAULT: Self = Self::MAV_REMOTE_LOG_DATA_BLOCK_NACK;
4433}
4434impl Default for MavRemoteLogDataBlockStatuses {
4435    fn default() -> Self {
4436        Self::DEFAULT
4437    }
4438}
4439#[cfg_attr(feature = "ts", derive(TS))]
4440#[cfg_attr(feature = "ts", ts(export))]
4441#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4442#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4443#[cfg_attr(feature = "serde", serde(tag = "type"))]
4444#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4445#[repr(u32)]
4446#[doc = "Result from a MAVLink command (MAV_CMD)"]
4447pub enum MavResult {
4448    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
4449    MAV_RESULT_ACCEPTED = 0,
4450    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
4451    MAV_RESULT_TEMPORARILY_REJECTED = 1,
4452    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
4453    MAV_RESULT_DENIED = 2,
4454    #[doc = "Command is not supported (unknown)."]
4455    MAV_RESULT_UNSUPPORTED = 3,
4456    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
4457    MAV_RESULT_FAILED = 4,
4458    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
4459    MAV_RESULT_IN_PROGRESS = 5,
4460    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
4461    MAV_RESULT_CANCELLED = 6,
4462    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
4463    MAV_RESULT_COMMAND_LONG_ONLY = 7,
4464    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
4465    MAV_RESULT_COMMAND_INT_ONLY = 8,
4466    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
4467    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
4468}
4469impl MavResult {
4470    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
4471}
4472impl Default for MavResult {
4473    fn default() -> Self {
4474        Self::DEFAULT
4475    }
4476}
4477#[cfg_attr(feature = "ts", derive(TS))]
4478#[cfg_attr(feature = "ts", ts(export))]
4479#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4481#[cfg_attr(feature = "serde", serde(tag = "type"))]
4482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4483#[repr(u32)]
4484#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
4485#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
4486pub enum MavRoi {
4487    #[doc = "No region of interest."]
4488    MAV_ROI_NONE = 0,
4489    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
4490    MAV_ROI_WPNEXT = 1,
4491    #[doc = "Point toward given waypoint."]
4492    MAV_ROI_WPINDEX = 2,
4493    #[doc = "Point toward fixed location."]
4494    MAV_ROI_LOCATION = 3,
4495    #[doc = "Point toward of given id."]
4496    MAV_ROI_TARGET = 4,
4497}
4498impl MavRoi {
4499    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
4500}
4501impl Default for MavRoi {
4502    fn default() -> Self {
4503        Self::DEFAULT
4504    }
4505}
4506#[cfg_attr(feature = "ts", derive(TS))]
4507#[cfg_attr(feature = "ts", ts(export))]
4508#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4509#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4510#[cfg_attr(feature = "serde", serde(tag = "type"))]
4511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4512#[repr(u32)]
4513#[doc = "Enumeration of sensor orientation, according to its rotations"]
4514pub enum MavSensorOrientation {
4515    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
4516    MAV_SENSOR_ROTATION_NONE = 0,
4517    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
4518    MAV_SENSOR_ROTATION_YAW_45 = 1,
4519    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
4520    MAV_SENSOR_ROTATION_YAW_90 = 2,
4521    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
4522    MAV_SENSOR_ROTATION_YAW_135 = 3,
4523    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
4524    MAV_SENSOR_ROTATION_YAW_180 = 4,
4525    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
4526    MAV_SENSOR_ROTATION_YAW_225 = 5,
4527    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
4528    MAV_SENSOR_ROTATION_YAW_270 = 6,
4529    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
4530    MAV_SENSOR_ROTATION_YAW_315 = 7,
4531    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
4532    MAV_SENSOR_ROTATION_ROLL_180 = 8,
4533    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
4534    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
4535    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
4536    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
4537    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
4538    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
4539    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
4540    MAV_SENSOR_ROTATION_PITCH_180 = 12,
4541    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
4542    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
4543    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
4544    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
4545    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
4546    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
4547    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
4548    MAV_SENSOR_ROTATION_ROLL_90 = 16,
4549    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
4550    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
4551    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
4552    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
4553    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
4554    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
4555    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
4556    MAV_SENSOR_ROTATION_ROLL_270 = 20,
4557    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
4558    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
4559    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
4560    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
4561    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
4562    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
4563    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
4564    MAV_SENSOR_ROTATION_PITCH_90 = 24,
4565    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
4566    MAV_SENSOR_ROTATION_PITCH_270 = 25,
4567    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
4568    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
4569    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
4570    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
4571    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
4572    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
4573    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
4574    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
4575    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
4576    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
4577    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
4578    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
4579    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
4580    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
4581    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
4582    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
4583    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
4584    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
4585    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
4586    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
4587    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
4588    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
4589    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
4590    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
4591    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
4592    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
4593    #[doc = "Pitch: 315"]
4594    MAV_SENSOR_ROTATION_PITCH_315 = 39,
4595    #[doc = "Roll: 90, Pitch: 315"]
4596    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
4597    #[doc = "Custom orientation"]
4598    MAV_SENSOR_ROTATION_CUSTOM = 100,
4599}
4600impl MavSensorOrientation {
4601    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
4602}
4603impl Default for MavSensorOrientation {
4604    fn default() -> Self {
4605        Self::DEFAULT
4606    }
4607}
4608#[cfg_attr(feature = "ts", derive(TS))]
4609#[cfg_attr(feature = "ts", ts(export))]
4610#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4611#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4612#[cfg_attr(feature = "serde", serde(tag = "type"))]
4613#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4614#[repr(u32)]
4615#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
4616pub enum MavSeverity {
4617    #[doc = "System is unusable. This is a \"panic\" condition."]
4618    MAV_SEVERITY_EMERGENCY = 0,
4619    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
4620    MAV_SEVERITY_ALERT = 1,
4621    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
4622    MAV_SEVERITY_CRITICAL = 2,
4623    #[doc = "Indicates an error in secondary/redundant systems."]
4624    MAV_SEVERITY_ERROR = 3,
4625    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
4626    MAV_SEVERITY_WARNING = 4,
4627    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
4628    MAV_SEVERITY_NOTICE = 5,
4629    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
4630    MAV_SEVERITY_INFO = 6,
4631    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
4632    MAV_SEVERITY_DEBUG = 7,
4633}
4634impl MavSeverity {
4635    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
4636}
4637impl Default for MavSeverity {
4638    fn default() -> Self {
4639        Self::DEFAULT
4640    }
4641}
4642#[cfg_attr(feature = "ts", derive(TS))]
4643#[cfg_attr(feature = "ts", ts(export))]
4644#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4645#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4646#[cfg_attr(feature = "serde", serde(tag = "type"))]
4647#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4648#[repr(u32)]
4649#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
4650pub enum MavStandardMode {
4651    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
4652    MAV_STANDARD_MODE_NON_STANDARD = 0,
4653    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
4654    MAV_STANDARD_MODE_POSITION_HOLD = 1,
4655    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
4656    MAV_STANDARD_MODE_ORBIT = 2,
4657    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
4658    MAV_STANDARD_MODE_CRUISE = 3,
4659    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
4660    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
4661    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
4662    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
4663    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
4664    MAV_STANDARD_MODE_MISSION = 6,
4665    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
4666    MAV_STANDARD_MODE_LAND = 7,
4667    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
4668    MAV_STANDARD_MODE_TAKEOFF = 8,
4669}
4670impl MavStandardMode {
4671    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
4672}
4673impl Default for MavStandardMode {
4674    fn default() -> Self {
4675        Self::DEFAULT
4676    }
4677}
4678#[cfg_attr(feature = "ts", derive(TS))]
4679#[cfg_attr(feature = "ts", ts(export))]
4680#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4681#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4682#[cfg_attr(feature = "serde", serde(tag = "type"))]
4683#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4684#[repr(u32)]
4685pub enum MavState {
4686    #[doc = "Uninitialized system, state is unknown."]
4687    MAV_STATE_UNINIT = 0,
4688    #[doc = "System is booting up."]
4689    MAV_STATE_BOOT = 1,
4690    #[doc = "System is calibrating and not flight-ready."]
4691    MAV_STATE_CALIBRATING = 2,
4692    #[doc = "System is grounded and on standby. It can be launched any time."]
4693    MAV_STATE_STANDBY = 3,
4694    #[doc = "System is active and might be already airborne. Motors are engaged."]
4695    MAV_STATE_ACTIVE = 4,
4696    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
4697    MAV_STATE_CRITICAL = 5,
4698    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
4699    MAV_STATE_EMERGENCY = 6,
4700    #[doc = "System just initialized its power-down sequence, will shut down now."]
4701    MAV_STATE_POWEROFF = 7,
4702    #[doc = "System is terminating itself (failsafe or commanded)."]
4703    MAV_STATE_FLIGHT_TERMINATION = 8,
4704}
4705impl MavState {
4706    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
4707}
4708impl Default for MavState {
4709    fn default() -> Self {
4710        Self::DEFAULT
4711    }
4712}
4713bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
4714impl MavSysStatusSensor {
4715    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
4716}
4717impl Default for MavSysStatusSensor {
4718    fn default() -> Self {
4719        Self::DEFAULT
4720    }
4721}
4722bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
4723impl MavSysStatusSensorExtended {
4724    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
4725}
4726impl Default for MavSysStatusSensorExtended {
4727    fn default() -> Self {
4728        Self::DEFAULT
4729    }
4730}
4731#[cfg_attr(feature = "ts", derive(TS))]
4732#[cfg_attr(feature = "ts", ts(export))]
4733#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4735#[cfg_attr(feature = "serde", serde(tag = "type"))]
4736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4737#[repr(u32)]
4738pub enum MavTunnelPayloadType {
4739    #[doc = "Encoding of payload unknown."]
4740    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
4741    #[doc = "Registered for STorM32 gimbal controller."]
4742    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
4743    #[doc = "Registered for STorM32 gimbal controller."]
4744    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
4745    #[doc = "Registered for STorM32 gimbal controller."]
4746    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
4747    #[doc = "Registered for STorM32 gimbal controller."]
4748    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
4749    #[doc = "Registered for STorM32 gimbal controller."]
4750    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
4751    #[doc = "Registered for STorM32 gimbal controller."]
4752    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
4753    #[doc = "Registered for STorM32 gimbal controller."]
4754    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
4755    #[doc = "Registered for STorM32 gimbal controller."]
4756    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
4757    #[doc = "Registered for STorM32 gimbal controller."]
4758    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
4759    #[doc = "Registered for STorM32 gimbal controller."]
4760    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
4761    #[doc = "Registered for ModalAI remote OSD protocol."]
4762    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
4763    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
4764    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
4765    #[doc = "Registered for ModalAI vendor use."]
4766    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
4767}
4768impl MavTunnelPayloadType {
4769    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
4770}
4771impl Default for MavTunnelPayloadType {
4772    fn default() -> Self {
4773        Self::DEFAULT
4774    }
4775}
4776#[cfg_attr(feature = "ts", derive(TS))]
4777#[cfg_attr(feature = "ts", ts(export))]
4778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4780#[cfg_attr(feature = "serde", serde(tag = "type"))]
4781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4782#[repr(u32)]
4783#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
4784pub enum MavType {
4785    #[doc = "Generic micro air vehicle"]
4786    MAV_TYPE_GENERIC = 0,
4787    #[doc = "Fixed wing aircraft."]
4788    MAV_TYPE_FIXED_WING = 1,
4789    #[doc = "Quadrotor"]
4790    MAV_TYPE_QUADROTOR = 2,
4791    #[doc = "Coaxial helicopter"]
4792    MAV_TYPE_COAXIAL = 3,
4793    #[doc = "Normal helicopter with tail rotor."]
4794    MAV_TYPE_HELICOPTER = 4,
4795    #[doc = "Ground installation"]
4796    MAV_TYPE_ANTENNA_TRACKER = 5,
4797    #[doc = "Operator control unit / ground control station"]
4798    MAV_TYPE_GCS = 6,
4799    #[doc = "Airship, controlled"]
4800    MAV_TYPE_AIRSHIP = 7,
4801    #[doc = "Free balloon, uncontrolled"]
4802    MAV_TYPE_FREE_BALLOON = 8,
4803    #[doc = "Rocket"]
4804    MAV_TYPE_ROCKET = 9,
4805    #[doc = "Ground rover"]
4806    MAV_TYPE_GROUND_ROVER = 10,
4807    #[doc = "Surface vessel, boat, ship"]
4808    MAV_TYPE_SURFACE_BOAT = 11,
4809    #[doc = "Submarine"]
4810    MAV_TYPE_SUBMARINE = 12,
4811    #[doc = "Hexarotor"]
4812    MAV_TYPE_HEXAROTOR = 13,
4813    #[doc = "Octorotor"]
4814    MAV_TYPE_OCTOROTOR = 14,
4815    #[doc = "Tricopter"]
4816    MAV_TYPE_TRICOPTER = 15,
4817    #[doc = "Flapping wing"]
4818    MAV_TYPE_FLAPPING_WING = 16,
4819    #[doc = "Kite"]
4820    MAV_TYPE_KITE = 17,
4821    #[doc = "Onboard companion controller"]
4822    MAV_TYPE_ONBOARD_CONTROLLER = 18,
4823    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
4824    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
4825    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
4826    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
4827    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
4828    MAV_TYPE_VTOL_TILTROTOR = 21,
4829    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
4830    MAV_TYPE_VTOL_FIXEDROTOR = 22,
4831    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
4832    MAV_TYPE_VTOL_TAILSITTER = 23,
4833    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
4834    MAV_TYPE_VTOL_TILTWING = 24,
4835    #[doc = "VTOL reserved 5"]
4836    MAV_TYPE_VTOL_RESERVED5 = 25,
4837    #[doc = "Gimbal"]
4838    MAV_TYPE_GIMBAL = 26,
4839    #[doc = "ADSB system"]
4840    MAV_TYPE_ADSB = 27,
4841    #[doc = "Steerable, nonrigid airfoil"]
4842    MAV_TYPE_PARAFOIL = 28,
4843    #[doc = "Dodecarotor"]
4844    MAV_TYPE_DODECAROTOR = 29,
4845    #[doc = "Camera"]
4846    MAV_TYPE_CAMERA = 30,
4847    #[doc = "Charging station"]
4848    MAV_TYPE_CHARGING_STATION = 31,
4849    #[doc = "FLARM collision avoidance system"]
4850    MAV_TYPE_FLARM = 32,
4851    #[doc = "Servo"]
4852    MAV_TYPE_SERVO = 33,
4853    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
4854    MAV_TYPE_ODID = 34,
4855    #[doc = "Decarotor"]
4856    MAV_TYPE_DECAROTOR = 35,
4857    #[doc = "Battery"]
4858    MAV_TYPE_BATTERY = 36,
4859    #[doc = "Parachute"]
4860    MAV_TYPE_PARACHUTE = 37,
4861    #[doc = "Log"]
4862    MAV_TYPE_LOG = 38,
4863    #[doc = "OSD"]
4864    MAV_TYPE_OSD = 39,
4865    #[doc = "IMU"]
4866    MAV_TYPE_IMU = 40,
4867    #[doc = "GPS"]
4868    MAV_TYPE_GPS = 41,
4869    #[doc = "Winch"]
4870    MAV_TYPE_WINCH = 42,
4871    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
4872    MAV_TYPE_GENERIC_MULTIROTOR = 43,
4873    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
4874    MAV_TYPE_ILLUMINATOR = 44,
4875    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
4876    MAV_TYPE_SPACECRAFT_ORBITER = 45,
4877}
4878impl MavType {
4879    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
4880}
4881impl Default for MavType {
4882    fn default() -> Self {
4883        Self::DEFAULT
4884    }
4885}
4886#[cfg_attr(feature = "ts", derive(TS))]
4887#[cfg_attr(feature = "ts", ts(export))]
4888#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4889#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4890#[cfg_attr(feature = "serde", serde(tag = "type"))]
4891#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4892#[repr(u32)]
4893#[doc = "Enumeration of VTOL states"]
4894pub enum MavVtolState {
4895    #[doc = "MAV is not configured as VTOL"]
4896    MAV_VTOL_STATE_UNDEFINED = 0,
4897    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
4898    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
4899    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
4900    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
4901    #[doc = "VTOL is in multicopter state"]
4902    MAV_VTOL_STATE_MC = 3,
4903    #[doc = "VTOL is in fixed-wing state"]
4904    MAV_VTOL_STATE_FW = 4,
4905}
4906impl MavVtolState {
4907    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
4908}
4909impl Default for MavVtolState {
4910    fn default() -> Self {
4911        Self::DEFAULT
4912    }
4913}
4914bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
4915impl MavWinchStatusFlag {
4916    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
4917}
4918impl Default for MavWinchStatusFlag {
4919    fn default() -> Self {
4920        Self::DEFAULT
4921    }
4922}
4923#[cfg_attr(feature = "ts", derive(TS))]
4924#[cfg_attr(feature = "ts", ts(export))]
4925#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4927#[cfg_attr(feature = "serde", serde(tag = "type"))]
4928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4929#[repr(u32)]
4930pub enum MavlinkDataStreamType {
4931    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
4932    MAVLINK_DATA_STREAM_IMG_BMP = 1,
4933    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
4934    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
4935    MAVLINK_DATA_STREAM_IMG_PGM = 4,
4936    MAVLINK_DATA_STREAM_IMG_PNG = 5,
4937}
4938impl MavlinkDataStreamType {
4939    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
4940}
4941impl Default for MavlinkDataStreamType {
4942    fn default() -> Self {
4943        Self::DEFAULT
4944    }
4945}
4946#[cfg_attr(feature = "ts", derive(TS))]
4947#[cfg_attr(feature = "ts", ts(export))]
4948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4950#[cfg_attr(feature = "serde", serde(tag = "type"))]
4951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4952#[repr(u32)]
4953#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
4954pub enum MissionState {
4955    #[doc = "The mission status reporting is not supported."]
4956    MISSION_STATE_UNKNOWN = 0,
4957    #[doc = "No mission on the vehicle."]
4958    MISSION_STATE_NO_MISSION = 1,
4959    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
4960    MISSION_STATE_NOT_STARTED = 2,
4961    #[doc = "Mission is active, and will execute mission items when in auto mode."]
4962    MISSION_STATE_ACTIVE = 3,
4963    #[doc = "Mission is paused when in auto mode."]
4964    MISSION_STATE_PAUSED = 4,
4965    #[doc = "Mission has executed all mission items."]
4966    MISSION_STATE_COMPLETE = 5,
4967}
4968impl MissionState {
4969    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
4970}
4971impl Default for MissionState {
4972    fn default() -> Self {
4973        Self::DEFAULT
4974    }
4975}
4976#[cfg_attr(feature = "ts", derive(TS))]
4977#[cfg_attr(feature = "ts", ts(export))]
4978#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4979#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4980#[cfg_attr(feature = "serde", serde(tag = "type"))]
4981#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4982#[repr(u32)]
4983#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
4984pub enum MotorTestOrder {
4985    #[doc = "Default autopilot motor test method."]
4986    MOTOR_TEST_ORDER_DEFAULT = 0,
4987    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
4988    MOTOR_TEST_ORDER_SEQUENCE = 1,
4989    #[doc = "Motor numbers are specified as the output as labeled on the board."]
4990    MOTOR_TEST_ORDER_BOARD = 2,
4991}
4992impl MotorTestOrder {
4993    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
4994}
4995impl Default for MotorTestOrder {
4996    fn default() -> Self {
4997        Self::DEFAULT
4998    }
4999}
5000#[cfg_attr(feature = "ts", derive(TS))]
5001#[cfg_attr(feature = "ts", ts(export))]
5002#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5003#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5004#[cfg_attr(feature = "serde", serde(tag = "type"))]
5005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5006#[repr(u32)]
5007#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
5008pub enum MotorTestThrottleType {
5009    #[doc = "Throttle as a percentage (0 ~ 100)"]
5010    MOTOR_TEST_THROTTLE_PERCENT = 0,
5011    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
5012    MOTOR_TEST_THROTTLE_PWM = 1,
5013    #[doc = "Throttle pass-through from pilot's transmitter."]
5014    MOTOR_TEST_THROTTLE_PILOT = 2,
5015    #[doc = "Per-motor compass calibration test."]
5016    MOTOR_TEST_COMPASS_CAL = 3,
5017}
5018impl MotorTestThrottleType {
5019    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
5020}
5021impl Default for MotorTestThrottleType {
5022    fn default() -> Self {
5023        Self::DEFAULT
5024    }
5025}
5026#[cfg_attr(feature = "ts", derive(TS))]
5027#[cfg_attr(feature = "ts", ts(export))]
5028#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5030#[cfg_attr(feature = "serde", serde(tag = "type"))]
5031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5032#[repr(u32)]
5033pub enum NavVtolLandOptions {
5034    #[doc = "Default autopilot landing behaviour."]
5035    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
5036    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
5037    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
5038    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
5039    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
5040}
5041impl NavVtolLandOptions {
5042    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
5043}
5044impl Default for NavVtolLandOptions {
5045    fn default() -> Self {
5046        Self::DEFAULT
5047    }
5048}
5049#[cfg_attr(feature = "ts", derive(TS))]
5050#[cfg_attr(feature = "ts", ts(export))]
5051#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5053#[cfg_attr(feature = "serde", serde(tag = "type"))]
5054#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5055#[repr(u32)]
5056#[doc = "Yaw behaviour during orbit flight."]
5057pub enum OrbitYawBehaviour {
5058    #[doc = "Vehicle front points to the center (default)."]
5059    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
5060    #[doc = "Vehicle front holds heading when message received."]
5061    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
5062    #[doc = "Yaw uncontrolled."]
5063    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
5064    #[doc = "Vehicle front follows flight path (tangential to circle)."]
5065    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
5066    #[doc = "Yaw controlled by RC input."]
5067    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
5068    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
5069    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
5070}
5071impl OrbitYawBehaviour {
5072    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
5073}
5074impl Default for OrbitYawBehaviour {
5075    fn default() -> Self {
5076        Self::DEFAULT
5077    }
5078}
5079#[cfg_attr(feature = "ts", derive(TS))]
5080#[cfg_attr(feature = "ts", ts(export))]
5081#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5083#[cfg_attr(feature = "serde", serde(tag = "type"))]
5084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5085#[repr(u32)]
5086#[doc = "The error type for the OSD parameter editor."]
5087pub enum OsdParamConfigError {
5088    OSD_PARAM_SUCCESS = 0,
5089    OSD_PARAM_INVALID_SCREEN = 1,
5090    OSD_PARAM_INVALID_PARAMETER_INDEX = 2,
5091    OSD_PARAM_INVALID_PARAMETER = 3,
5092}
5093impl OsdParamConfigError {
5094    pub const DEFAULT: Self = Self::OSD_PARAM_SUCCESS;
5095}
5096impl Default for OsdParamConfigError {
5097    fn default() -> Self {
5098        Self::DEFAULT
5099    }
5100}
5101#[cfg_attr(feature = "ts", derive(TS))]
5102#[cfg_attr(feature = "ts", ts(export))]
5103#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5105#[cfg_attr(feature = "serde", serde(tag = "type"))]
5106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5107#[repr(u32)]
5108#[doc = "The type of parameter for the OSD parameter editor."]
5109pub enum OsdParamConfigType {
5110    OSD_PARAM_NONE = 0,
5111    OSD_PARAM_SERIAL_PROTOCOL = 1,
5112    OSD_PARAM_SERVO_FUNCTION = 2,
5113    OSD_PARAM_AUX_FUNCTION = 3,
5114    OSD_PARAM_FLIGHT_MODE = 4,
5115    OSD_PARAM_FAILSAFE_ACTION = 5,
5116    OSD_PARAM_FAILSAFE_ACTION_1 = 6,
5117    OSD_PARAM_FAILSAFE_ACTION_2 = 7,
5118    OSD_PARAM_NUM_TYPES = 8,
5119}
5120impl OsdParamConfigType {
5121    pub const DEFAULT: Self = Self::OSD_PARAM_NONE;
5122}
5123impl Default for OsdParamConfigType {
5124    fn default() -> Self {
5125        Self::DEFAULT
5126    }
5127}
5128#[cfg_attr(feature = "ts", derive(TS))]
5129#[cfg_attr(feature = "ts", ts(export))]
5130#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5132#[cfg_attr(feature = "serde", serde(tag = "type"))]
5133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5134#[repr(u32)]
5135#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
5136pub enum ParachuteAction {
5137    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
5138    PARACHUTE_DISABLE = 0,
5139    #[doc = "Enable auto-release of parachute."]
5140    PARACHUTE_ENABLE = 1,
5141    #[doc = "Release parachute and kill motors."]
5142    PARACHUTE_RELEASE = 2,
5143}
5144impl ParachuteAction {
5145    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
5146}
5147impl Default for ParachuteAction {
5148    fn default() -> Self {
5149        Self::DEFAULT
5150    }
5151}
5152#[cfg_attr(feature = "ts", derive(TS))]
5153#[cfg_attr(feature = "ts", ts(export))]
5154#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5156#[cfg_attr(feature = "serde", serde(tag = "type"))]
5157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5158#[repr(u32)]
5159#[doc = "Result from PARAM_EXT_SET message."]
5160pub enum ParamAck {
5161    #[doc = "Parameter value ACCEPTED and SET"]
5162    PARAM_ACK_ACCEPTED = 0,
5163    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
5164    PARAM_ACK_VALUE_UNSUPPORTED = 1,
5165    #[doc = "Parameter failed to set"]
5166    PARAM_ACK_FAILED = 2,
5167    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
5168    PARAM_ACK_IN_PROGRESS = 3,
5169}
5170impl ParamAck {
5171    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
5172}
5173impl Default for ParamAck {
5174    fn default() -> Self {
5175        Self::DEFAULT
5176    }
5177}
5178#[cfg_attr(feature = "ts", derive(TS))]
5179#[cfg_attr(feature = "ts", ts(export))]
5180#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5182#[cfg_attr(feature = "serde", serde(tag = "type"))]
5183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5184#[repr(u32)]
5185pub enum PidTuningAxis {
5186    PID_TUNING_ROLL = 1,
5187    PID_TUNING_PITCH = 2,
5188    PID_TUNING_YAW = 3,
5189    PID_TUNING_ACCZ = 4,
5190    PID_TUNING_STEER = 5,
5191    PID_TUNING_LANDING = 6,
5192}
5193impl PidTuningAxis {
5194    pub const DEFAULT: Self = Self::PID_TUNING_ROLL;
5195}
5196impl Default for PidTuningAxis {
5197    fn default() -> Self {
5198        Self::DEFAULT
5199    }
5200}
5201#[cfg_attr(feature = "ts", derive(TS))]
5202#[cfg_attr(feature = "ts", ts(export))]
5203#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5205#[cfg_attr(feature = "serde", serde(tag = "type"))]
5206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5207#[repr(u32)]
5208#[doc = "A mapping of plane flight modes for custom_mode field of heartbeat."]
5209pub enum PlaneMode {
5210    #[doc = "MANUAL"]
5211    PLANE_MODE_MANUAL = 0,
5212    #[doc = "CIRCLE"]
5213    PLANE_MODE_CIRCLE = 1,
5214    #[doc = "STABILIZE"]
5215    PLANE_MODE_STABILIZE = 2,
5216    #[doc = "TRAINING"]
5217    PLANE_MODE_TRAINING = 3,
5218    #[doc = "ACRO"]
5219    PLANE_MODE_ACRO = 4,
5220    #[doc = "FBWA"]
5221    PLANE_MODE_FLY_BY_WIRE_A = 5,
5222    #[doc = "FBWB"]
5223    PLANE_MODE_FLY_BY_WIRE_B = 6,
5224    #[doc = "CRUISE"]
5225    PLANE_MODE_CRUISE = 7,
5226    #[doc = "AUTOTUNE"]
5227    PLANE_MODE_AUTOTUNE = 8,
5228    #[doc = "AUTO"]
5229    PLANE_MODE_AUTO = 10,
5230    #[doc = "RTL"]
5231    PLANE_MODE_RTL = 11,
5232    #[doc = "LOITER"]
5233    PLANE_MODE_LOITER = 12,
5234    #[doc = "TAKEOFF"]
5235    PLANE_MODE_TAKEOFF = 13,
5236    #[doc = "AVOID ADSB"]
5237    PLANE_MODE_AVOID_ADSB = 14,
5238    #[doc = "GUIDED"]
5239    PLANE_MODE_GUIDED = 15,
5240    #[doc = "INITIALISING"]
5241    PLANE_MODE_INITIALIZING = 16,
5242    #[doc = "QSTABILIZE"]
5243    PLANE_MODE_QSTABILIZE = 17,
5244    #[doc = "QHOVER"]
5245    PLANE_MODE_QHOVER = 18,
5246    #[doc = "QLOITER"]
5247    PLANE_MODE_QLOITER = 19,
5248    #[doc = "QLAND"]
5249    PLANE_MODE_QLAND = 20,
5250    #[doc = "QRTL"]
5251    PLANE_MODE_QRTL = 21,
5252    #[doc = "QAUTOTUNE"]
5253    PLANE_MODE_QAUTOTUNE = 22,
5254    #[doc = "QACRO"]
5255    PLANE_MODE_QACRO = 23,
5256    #[doc = "THERMAL"]
5257    PLANE_MODE_THERMAL = 24,
5258    #[doc = "LOITER2QLAND"]
5259    PLANE_MODE_LOITER_ALT_QLAND = 25,
5260    #[doc = "AUTOLAND"]
5261    PLANE_MODE_AUTOLAND = 26,
5262}
5263impl PlaneMode {
5264    pub const DEFAULT: Self = Self::PLANE_MODE_MANUAL;
5265}
5266impl Default for PlaneMode {
5267    fn default() -> Self {
5268        Self::DEFAULT
5269    }
5270}
5271bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
5272impl PositionTargetTypemask {
5273    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
5274}
5275impl Default for PositionTargetTypemask {
5276    fn default() -> Self {
5277        Self::DEFAULT
5278    }
5279}
5280#[cfg_attr(feature = "ts", derive(TS))]
5281#[cfg_attr(feature = "ts", ts(export))]
5282#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5283#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5284#[cfg_attr(feature = "serde", serde(tag = "type"))]
5285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5286#[repr(u32)]
5287#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
5288pub enum PrecisionLandMode {
5289    #[doc = "Normal (non-precision) landing."]
5290    PRECISION_LAND_MODE_DISABLED = 0,
5291    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
5292    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
5293    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
5294    PRECISION_LAND_MODE_REQUIRED = 2,
5295}
5296impl PrecisionLandMode {
5297    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
5298}
5299impl Default for PrecisionLandMode {
5300    fn default() -> Self {
5301        Self::DEFAULT
5302    }
5303}
5304#[cfg_attr(feature = "ts", derive(TS))]
5305#[cfg_attr(feature = "ts", ts(export))]
5306#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5307#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5308#[cfg_attr(feature = "serde", serde(tag = "type"))]
5309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5310#[repr(u32)]
5311#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
5312pub enum PreflightStorageMissionAction {
5313    #[doc = "Read current mission data from persistent storage"]
5314    MISSION_READ_PERSISTENT = 0,
5315    #[doc = "Write current mission data to persistent storage"]
5316    MISSION_WRITE_PERSISTENT = 1,
5317    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
5318    MISSION_RESET_DEFAULT = 2,
5319}
5320impl PreflightStorageMissionAction {
5321    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
5322}
5323impl Default for PreflightStorageMissionAction {
5324    fn default() -> Self {
5325        Self::DEFAULT
5326    }
5327}
5328#[cfg_attr(feature = "ts", derive(TS))]
5329#[cfg_attr(feature = "ts", ts(export))]
5330#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5331#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5332#[cfg_attr(feature = "serde", serde(tag = "type"))]
5333#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5334#[repr(u32)]
5335#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
5336pub enum PreflightStorageParameterAction {
5337    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
5338    PARAM_READ_PERSISTENT = 0,
5339    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
5340    PARAM_WRITE_PERSISTENT = 1,
5341    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
5342    PARAM_RESET_CONFIG_DEFAULT = 2,
5343    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
5344    PARAM_RESET_SENSOR_DEFAULT = 3,
5345    #[doc = "Reset all parameters, including operation counters, to default values"]
5346    PARAM_RESET_ALL_DEFAULT = 4,
5347}
5348impl PreflightStorageParameterAction {
5349    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
5350}
5351impl Default for PreflightStorageParameterAction {
5352    fn default() -> Self {
5353        Self::DEFAULT
5354    }
5355}
5356#[cfg_attr(feature = "ts", derive(TS))]
5357#[cfg_attr(feature = "ts", ts(export))]
5358#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5360#[cfg_attr(feature = "serde", serde(tag = "type"))]
5361#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5362#[repr(u32)]
5363#[doc = "Flags in RALLY_POINT message."]
5364pub enum RallyFlags {
5365    #[doc = "Flag set when requiring favorable winds for landing."]
5366    FAVORABLE_WIND = 1,
5367    #[doc = "Flag set when plane is to immediately descend to break altitude and land without GCS intervention. Flag not set when plane is to loiter at Rally point until commanded to land."]
5368    LAND_IMMEDIATELY = 2,
5369    #[doc = "True if the following altitude frame value is valid."]
5370    ALT_FRAME_VALID = 4,
5371    #[doc = "2 bit value representing altitude frame. 0: absolute, 1: relative home, 2: relative origin, 3: relative terrain"]
5372    ALT_FRAME = 24,
5373}
5374impl RallyFlags {
5375    pub const DEFAULT: Self = Self::FAVORABLE_WIND;
5376}
5377impl Default for RallyFlags {
5378    fn default() -> Self {
5379        Self::DEFAULT
5380    }
5381}
5382#[cfg_attr(feature = "ts", derive(TS))]
5383#[cfg_attr(feature = "ts", ts(export))]
5384#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5386#[cfg_attr(feature = "serde", serde(tag = "type"))]
5387#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5388#[repr(u32)]
5389#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
5390pub enum RcSubType {
5391    #[doc = "Spektrum DSM2"]
5392    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
5393    #[doc = "Spektrum DSMX"]
5394    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
5395    #[doc = "Spektrum DSMX8"]
5396    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
5397}
5398impl RcSubType {
5399    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
5400}
5401impl Default for RcSubType {
5402    fn default() -> Self {
5403        Self::DEFAULT
5404    }
5405}
5406#[cfg_attr(feature = "ts", derive(TS))]
5407#[cfg_attr(feature = "ts", ts(export))]
5408#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5409#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5410#[cfg_attr(feature = "serde", serde(tag = "type"))]
5411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5412#[repr(u32)]
5413#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
5414pub enum RcType {
5415    #[doc = "Spektrum"]
5416    RC_TYPE_SPEKTRUM = 0,
5417    #[doc = "CRSF"]
5418    RC_TYPE_CRSF = 1,
5419}
5420impl RcType {
5421    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
5422}
5423impl Default for RcType {
5424    fn default() -> Self {
5425        Self::DEFAULT
5426    }
5427}
5428#[cfg_attr(feature = "ts", derive(TS))]
5429#[cfg_attr(feature = "ts", ts(export))]
5430#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5431#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5432#[cfg_attr(feature = "serde", serde(tag = "type"))]
5433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5434#[repr(u32)]
5435#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
5436pub enum RebootShutdownConditions {
5437    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
5438    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
5439    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
5440    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
5441}
5442impl RebootShutdownConditions {
5443    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
5444}
5445impl Default for RebootShutdownConditions {
5446    fn default() -> Self {
5447        Self::DEFAULT
5448    }
5449}
5450#[cfg_attr(feature = "ts", derive(TS))]
5451#[cfg_attr(feature = "ts", ts(export))]
5452#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5454#[cfg_attr(feature = "serde", serde(tag = "type"))]
5455#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5456#[repr(u32)]
5457#[doc = "A mapping of rover flight modes for custom_mode field of heartbeat."]
5458pub enum RoverMode {
5459    #[doc = "MANUAL"]
5460    ROVER_MODE_MANUAL = 0,
5461    #[doc = "ACRO"]
5462    ROVER_MODE_ACRO = 1,
5463    #[doc = "STEERING"]
5464    ROVER_MODE_STEERING = 3,
5465    #[doc = "HOLD"]
5466    ROVER_MODE_HOLD = 4,
5467    #[doc = "LOITER"]
5468    ROVER_MODE_LOITER = 5,
5469    #[doc = "FOLLOW"]
5470    ROVER_MODE_FOLLOW = 6,
5471    #[doc = "SIMPLE"]
5472    ROVER_MODE_SIMPLE = 7,
5473    #[doc = "DOCK"]
5474    ROVER_MODE_DOCK = 8,
5475    #[doc = "CIRCLE"]
5476    ROVER_MODE_CIRCLE = 9,
5477    #[doc = "AUTO"]
5478    ROVER_MODE_AUTO = 10,
5479    #[doc = "RTL"]
5480    ROVER_MODE_RTL = 11,
5481    #[doc = "SMART RTL"]
5482    ROVER_MODE_SMART_RTL = 12,
5483    #[doc = "GUIDED"]
5484    ROVER_MODE_GUIDED = 15,
5485    #[doc = "INITIALISING"]
5486    ROVER_MODE_INITIALIZING = 16,
5487}
5488impl RoverMode {
5489    pub const DEFAULT: Self = Self::ROVER_MODE_MANUAL;
5490}
5491impl Default for RoverMode {
5492    fn default() -> Self {
5493        Self::DEFAULT
5494    }
5495}
5496#[cfg_attr(feature = "ts", derive(TS))]
5497#[cfg_attr(feature = "ts", ts(export))]
5498#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5500#[cfg_attr(feature = "serde", serde(tag = "type"))]
5501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5502#[repr(u32)]
5503#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
5504pub enum RtkBaselineCoordinateSystem {
5505    #[doc = "Earth-centered, Earth-fixed"]
5506    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
5507    #[doc = "RTK basestation centered, north, east, down"]
5508    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
5509}
5510impl RtkBaselineCoordinateSystem {
5511    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
5512}
5513impl Default for RtkBaselineCoordinateSystem {
5514    fn default() -> Self {
5515        Self::DEFAULT
5516    }
5517}
5518#[cfg_attr(feature = "ts", derive(TS))]
5519#[cfg_attr(feature = "ts", ts(export))]
5520#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5522#[cfg_attr(feature = "serde", serde(tag = "type"))]
5523#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5524#[repr(u32)]
5525#[doc = "Possible safety switch states."]
5526pub enum SafetySwitchState {
5527    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
5528    SAFETY_SWITCH_STATE_SAFE = 0,
5529    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
5530    SAFETY_SWITCH_STATE_DANGEROUS = 1,
5531}
5532impl SafetySwitchState {
5533    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
5534}
5535impl Default for SafetySwitchState {
5536    fn default() -> Self {
5537        Self::DEFAULT
5538    }
5539}
5540#[cfg_attr(feature = "ts", derive(TS))]
5541#[cfg_attr(feature = "ts", ts(export))]
5542#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5543#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5544#[cfg_attr(feature = "serde", serde(tag = "type"))]
5545#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5546#[repr(u32)]
5547pub enum ScriptingCmd {
5548    #[doc = "Start a REPL session."]
5549    SCRIPTING_CMD_REPL_START = 0,
5550    #[doc = "End a REPL session."]
5551    SCRIPTING_CMD_REPL_STOP = 1,
5552    #[doc = "Stop execution of scripts."]
5553    SCRIPTING_CMD_STOP = 2,
5554    #[doc = "Stop execution of scripts and restart."]
5555    SCRIPTING_CMD_STOP_AND_RESTART = 3,
5556}
5557impl ScriptingCmd {
5558    pub const DEFAULT: Self = Self::SCRIPTING_CMD_REPL_START;
5559}
5560impl Default for ScriptingCmd {
5561    fn default() -> Self {
5562        Self::DEFAULT
5563    }
5564}
5565#[cfg_attr(feature = "ts", derive(TS))]
5566#[cfg_attr(feature = "ts", ts(export))]
5567#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5569#[cfg_attr(feature = "serde", serde(tag = "type"))]
5570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5571#[repr(u32)]
5572pub enum SecureCommandOp {
5573    #[doc = "Get an 8 byte session key which is used for remote secure updates which operate on flight controller data such as bootloader public keys. Return data will be 8 bytes on success. The session key remains valid until either the flight controller reboots or another SECURE_COMMAND_GET_SESSION_KEY is run."]
5574    SECURE_COMMAND_GET_SESSION_KEY = 0,
5575    #[doc = "Get an 8 byte session key which is used for remote secure updates which operate on RemoteID module data. Return data will be 8 bytes on success. The session key remains valid until either the remote ID module reboots or another SECURE_COMMAND_GET_REMOTEID_SESSION_KEY is run."]
5576    SECURE_COMMAND_GET_REMOTEID_SESSION_KEY = 1,
5577    #[doc = "Remove range of public keys from the bootloader. Command data consists of two bytes, first byte if index of first public key to remove. Second byte is the number of keys to remove. If all keys are removed then secure boot is disabled and insecure firmware can be loaded."]
5578    SECURE_COMMAND_REMOVE_PUBLIC_KEYS = 2,
5579    #[doc = "Get current public keys from the bootloader. Command data consists of two bytes, first byte is index of first public key to fetch, 2nd byte is number of keys to fetch. Total data needs to fit in data portion of reply (max 6 keys for 32 byte keys). Reply data has the index of the first key in the first byte, followed by the keys. Returned keys may be less than the number of keys requested if there are less keys installed than requested."]
5580    SECURE_COMMAND_GET_PUBLIC_KEYS = 3,
5581    #[doc = "Set current public keys in the bootloader. Data consists of a one byte public key index followed by the public keys. With 32 byte keys this allows for up to 6 keys to be set in one request. Keys outside of the range that is being set will remain unchanged."]
5582    SECURE_COMMAND_SET_PUBLIC_KEYS = 4,
5583    #[doc = "Get config data for remote ID module. This command should be sent to the component ID of the flight controller which will forward it to the RemoteID module either over mavlink or DroneCAN. Data format is specific to the RemoteID implementation, see RemoteID firmware documentation for details."]
5584    SECURE_COMMAND_GET_REMOTEID_CONFIG = 5,
5585    #[doc = "Set config data for remote ID module. This command should be sent to the component ID of the flight controller which will forward it to the RemoteID module either over mavlink or DroneCAN. Data format is specific to the RemoteID implementation, see RemoteID firmware documentation for details."]
5586    SECURE_COMMAND_SET_REMOTEID_CONFIG = 6,
5587    #[doc = "Flash bootloader from local storage. Data is the filename to use for the bootloader. This is intended to be used with MAVFtp to upload a new bootloader to a microSD before flashing."]
5588    SECURE_COMMAND_FLASH_BOOTLOADER = 7,
5589}
5590impl SecureCommandOp {
5591    pub const DEFAULT: Self = Self::SECURE_COMMAND_GET_SESSION_KEY;
5592}
5593impl Default for SecureCommandOp {
5594    fn default() -> Self {
5595        Self::DEFAULT
5596    }
5597}
5598#[cfg_attr(feature = "ts", derive(TS))]
5599#[cfg_attr(feature = "ts", ts(export))]
5600#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5602#[cfg_attr(feature = "serde", serde(tag = "type"))]
5603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5604#[repr(u32)]
5605#[doc = "SERIAL_CONTROL device types"]
5606pub enum SerialControlDev {
5607    #[doc = "First telemetry port"]
5608    SERIAL_CONTROL_DEV_TELEM1 = 0,
5609    #[doc = "Second telemetry port"]
5610    SERIAL_CONTROL_DEV_TELEM2 = 1,
5611    #[doc = "First GPS port"]
5612    SERIAL_CONTROL_DEV_GPS1 = 2,
5613    #[doc = "Second GPS port"]
5614    SERIAL_CONTROL_DEV_GPS2 = 3,
5615    #[doc = "system shell"]
5616    SERIAL_CONTROL_DEV_SHELL = 10,
5617    #[doc = "SERIAL0"]
5618    SERIAL_CONTROL_SERIAL0 = 100,
5619    #[doc = "SERIAL1"]
5620    SERIAL_CONTROL_SERIAL1 = 101,
5621    #[doc = "SERIAL2"]
5622    SERIAL_CONTROL_SERIAL2 = 102,
5623    #[doc = "SERIAL3"]
5624    SERIAL_CONTROL_SERIAL3 = 103,
5625    #[doc = "SERIAL4"]
5626    SERIAL_CONTROL_SERIAL4 = 104,
5627    #[doc = "SERIAL5"]
5628    SERIAL_CONTROL_SERIAL5 = 105,
5629    #[doc = "SERIAL6"]
5630    SERIAL_CONTROL_SERIAL6 = 106,
5631    #[doc = "SERIAL7"]
5632    SERIAL_CONTROL_SERIAL7 = 107,
5633    #[doc = "SERIAL8"]
5634    SERIAL_CONTROL_SERIAL8 = 108,
5635    #[doc = "SERIAL9"]
5636    SERIAL_CONTROL_SERIAL9 = 109,
5637}
5638impl SerialControlDev {
5639    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
5640}
5641impl Default for SerialControlDev {
5642    fn default() -> Self {
5643        Self::DEFAULT
5644    }
5645}
5646bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
5647impl SerialControlFlag {
5648    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
5649}
5650impl Default for SerialControlFlag {
5651    fn default() -> Self {
5652        Self::DEFAULT
5653    }
5654}
5655#[cfg_attr(feature = "ts", derive(TS))]
5656#[cfg_attr(feature = "ts", ts(export))]
5657#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5659#[cfg_attr(feature = "serde", serde(tag = "type"))]
5660#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5661#[repr(u32)]
5662#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
5663pub enum SetFocusType {
5664    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
5665    FOCUS_TYPE_STEP = 0,
5666    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
5667    FOCUS_TYPE_CONTINUOUS = 1,
5668    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
5669    FOCUS_TYPE_RANGE = 2,
5670    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
5671    FOCUS_TYPE_METERS = 3,
5672    #[doc = "Focus automatically."]
5673    FOCUS_TYPE_AUTO = 4,
5674    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
5675    FOCUS_TYPE_AUTO_SINGLE = 5,
5676    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
5677    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
5678}
5679impl SetFocusType {
5680    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
5681}
5682impl Default for SetFocusType {
5683    fn default() -> Self {
5684        Self::DEFAULT
5685    }
5686}
5687#[cfg_attr(feature = "ts", derive(TS))]
5688#[cfg_attr(feature = "ts", ts(export))]
5689#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5691#[cfg_attr(feature = "serde", serde(tag = "type"))]
5692#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5693#[repr(u32)]
5694#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
5695pub enum SpeedType {
5696    #[doc = "Airspeed"]
5697    SPEED_TYPE_AIRSPEED = 0,
5698    #[doc = "Groundspeed"]
5699    SPEED_TYPE_GROUNDSPEED = 1,
5700    #[doc = "Climb speed"]
5701    SPEED_TYPE_CLIMB_SPEED = 2,
5702    #[doc = "Descent speed"]
5703    SPEED_TYPE_DESCENT_SPEED = 3,
5704}
5705impl SpeedType {
5706    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
5707}
5708impl Default for SpeedType {
5709    fn default() -> Self {
5710        Self::DEFAULT
5711    }
5712}
5713#[cfg_attr(feature = "ts", derive(TS))]
5714#[cfg_attr(feature = "ts", ts(export))]
5715#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5716#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5717#[cfg_attr(feature = "serde", serde(tag = "type"))]
5718#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5719#[repr(u32)]
5720#[doc = "Flags to indicate the status of camera storage."]
5721pub enum StorageStatus {
5722    #[doc = "Storage is missing (no microSD card loaded for example.)"]
5723    STORAGE_STATUS_EMPTY = 0,
5724    #[doc = "Storage present but unformatted."]
5725    STORAGE_STATUS_UNFORMATTED = 1,
5726    #[doc = "Storage present and ready."]
5727    STORAGE_STATUS_READY = 2,
5728    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
5729    STORAGE_STATUS_NOT_SUPPORTED = 3,
5730}
5731impl StorageStatus {
5732    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
5733}
5734impl Default for StorageStatus {
5735    fn default() -> Self {
5736        Self::DEFAULT
5737    }
5738}
5739#[cfg_attr(feature = "ts", derive(TS))]
5740#[cfg_attr(feature = "ts", ts(export))]
5741#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5742#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5743#[cfg_attr(feature = "serde", serde(tag = "type"))]
5744#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5745#[repr(u32)]
5746#[doc = "Flags to indicate the type of storage."]
5747pub enum StorageType {
5748    #[doc = "Storage type is not known."]
5749    STORAGE_TYPE_UNKNOWN = 0,
5750    #[doc = "Storage type is USB device."]
5751    STORAGE_TYPE_USB_STICK = 1,
5752    #[doc = "Storage type is SD card."]
5753    STORAGE_TYPE_SD = 2,
5754    #[doc = "Storage type is microSD card."]
5755    STORAGE_TYPE_MICROSD = 3,
5756    #[doc = "Storage type is CFast."]
5757    STORAGE_TYPE_CF = 4,
5758    #[doc = "Storage type is CFexpress."]
5759    STORAGE_TYPE_CFE = 5,
5760    #[doc = "Storage type is XQD."]
5761    STORAGE_TYPE_XQD = 6,
5762    #[doc = "Storage type is HD mass storage type."]
5763    STORAGE_TYPE_HD = 7,
5764    #[doc = "Storage type is other, not listed type."]
5765    STORAGE_TYPE_OTHER = 254,
5766}
5767impl StorageType {
5768    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
5769}
5770impl Default for StorageType {
5771    fn default() -> Self {
5772        Self::DEFAULT
5773    }
5774}
5775bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
5776impl StorageUsageFlag {
5777    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
5778}
5779impl Default for StorageUsageFlag {
5780    fn default() -> Self {
5781        Self::DEFAULT
5782    }
5783}
5784#[cfg_attr(feature = "ts", derive(TS))]
5785#[cfg_attr(feature = "ts", ts(export))]
5786#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5788#[cfg_attr(feature = "serde", serde(tag = "type"))]
5789#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5790#[repr(u32)]
5791#[doc = "A mapping of sub flight modes for custom_mode field of heartbeat."]
5792pub enum SubMode {
5793    #[doc = "STABILIZE"]
5794    SUB_MODE_STABILIZE = 0,
5795    #[doc = "ACRO"]
5796    SUB_MODE_ACRO = 1,
5797    #[doc = "ALT HOLD"]
5798    SUB_MODE_ALT_HOLD = 2,
5799    #[doc = "AUTO"]
5800    SUB_MODE_AUTO = 3,
5801    #[doc = "GUIDED"]
5802    SUB_MODE_GUIDED = 4,
5803    #[doc = "CIRCLE"]
5804    SUB_MODE_CIRCLE = 7,
5805    #[doc = "SURFACE"]
5806    SUB_MODE_SURFACE = 9,
5807    #[doc = "POSHOLD"]
5808    SUB_MODE_POSHOLD = 16,
5809    #[doc = "MANUAL"]
5810    SUB_MODE_MANUAL = 19,
5811    #[doc = "MOTORDETECT"]
5812    SUB_MODE_MOTORDETECT = 20,
5813    #[doc = "SURFTRAK"]
5814    SUB_MODE_SURFTRAK = 21,
5815}
5816impl SubMode {
5817    pub const DEFAULT: Self = Self::SUB_MODE_STABILIZE;
5818}
5819impl Default for SubMode {
5820    fn default() -> Self {
5821        Self::DEFAULT
5822    }
5823}
5824#[cfg_attr(feature = "ts", derive(TS))]
5825#[cfg_attr(feature = "ts", ts(export))]
5826#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5828#[cfg_attr(feature = "serde", serde(tag = "type"))]
5829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5830#[repr(u32)]
5831#[doc = "A mapping of antenna tracker flight modes for custom_mode field of heartbeat."]
5832pub enum TrackerMode {
5833    #[doc = "MANUAL"]
5834    TRACKER_MODE_MANUAL = 0,
5835    #[doc = "STOP"]
5836    TRACKER_MODE_STOP = 1,
5837    #[doc = "SCAN"]
5838    TRACKER_MODE_SCAN = 2,
5839    #[doc = "SERVO TEST"]
5840    TRACKER_MODE_SERVO_TEST = 3,
5841    #[doc = "GUIDED"]
5842    TRACKER_MODE_GUIDED = 4,
5843    #[doc = "AUTO"]
5844    TRACKER_MODE_AUTO = 10,
5845    #[doc = "INITIALISING"]
5846    TRACKER_MODE_INITIALIZING = 16,
5847}
5848impl TrackerMode {
5849    pub const DEFAULT: Self = Self::TRACKER_MODE_MANUAL;
5850}
5851impl Default for TrackerMode {
5852    fn default() -> Self {
5853        Self::DEFAULT
5854    }
5855}
5856#[cfg_attr(feature = "ts", derive(TS))]
5857#[cfg_attr(feature = "ts", ts(export))]
5858#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5860#[cfg_attr(feature = "serde", serde(tag = "type"))]
5861#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5862#[repr(u32)]
5863#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
5864pub enum TuneFormat {
5865    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
5866    TUNE_FORMAT_QBASIC1_1 = 1,
5867    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
5868    TUNE_FORMAT_MML_MODERN = 2,
5869}
5870impl TuneFormat {
5871    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
5872}
5873impl Default for TuneFormat {
5874    fn default() -> Self {
5875        Self::DEFAULT
5876    }
5877}
5878#[cfg_attr(feature = "ts", derive(TS))]
5879#[cfg_attr(feature = "ts", ts(export))]
5880#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5882#[cfg_attr(feature = "serde", serde(tag = "type"))]
5883#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5884#[repr(u32)]
5885#[doc = "Generalized UAVCAN node health"]
5886pub enum UavcanNodeHealth {
5887    #[doc = "The node is functioning properly."]
5888    UAVCAN_NODE_HEALTH_OK = 0,
5889    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
5890    UAVCAN_NODE_HEALTH_WARNING = 1,
5891    #[doc = "The node has encountered a major failure."]
5892    UAVCAN_NODE_HEALTH_ERROR = 2,
5893    #[doc = "The node has suffered a fatal malfunction."]
5894    UAVCAN_NODE_HEALTH_CRITICAL = 3,
5895}
5896impl UavcanNodeHealth {
5897    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
5898}
5899impl Default for UavcanNodeHealth {
5900    fn default() -> Self {
5901        Self::DEFAULT
5902    }
5903}
5904#[cfg_attr(feature = "ts", derive(TS))]
5905#[cfg_attr(feature = "ts", ts(export))]
5906#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5907#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5908#[cfg_attr(feature = "serde", serde(tag = "type"))]
5909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5910#[repr(u32)]
5911#[doc = "Generalized UAVCAN node mode"]
5912pub enum UavcanNodeMode {
5913    #[doc = "The node is performing its primary functions."]
5914    UAVCAN_NODE_MODE_OPERATIONAL = 0,
5915    #[doc = "The node is initializing; this mode is entered immediately after startup."]
5916    UAVCAN_NODE_MODE_INITIALIZATION = 1,
5917    #[doc = "The node is under maintenance."]
5918    UAVCAN_NODE_MODE_MAINTENANCE = 2,
5919    #[doc = "The node is in the process of updating its software."]
5920    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
5921    #[doc = "The node is no longer available online."]
5922    UAVCAN_NODE_MODE_OFFLINE = 7,
5923}
5924impl UavcanNodeMode {
5925    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
5926}
5927impl Default for UavcanNodeMode {
5928    fn default() -> Self {
5929        Self::DEFAULT
5930    }
5931}
5932#[cfg_attr(feature = "ts", derive(TS))]
5933#[cfg_attr(feature = "ts", ts(export))]
5934#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5936#[cfg_attr(feature = "serde", serde(tag = "type"))]
5937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5938#[repr(u32)]
5939#[doc = "Emergency status encoding"]
5940pub enum UavionixAdsbEmergencyStatus {
5941    UAVIONIX_ADSB_OUT_NO_EMERGENCY = 0,
5942    UAVIONIX_ADSB_OUT_GENERAL_EMERGENCY = 1,
5943    UAVIONIX_ADSB_OUT_LIFEGUARD_EMERGENCY = 2,
5944    UAVIONIX_ADSB_OUT_MINIMUM_FUEL_EMERGENCY = 3,
5945    UAVIONIX_ADSB_OUT_NO_COMM_EMERGENCY = 4,
5946    UAVIONIX_ADSB_OUT_UNLAWFUL_INTERFERANCE_EMERGENCY = 5,
5947    UAVIONIX_ADSB_OUT_DOWNED_AIRCRAFT_EMERGENCY = 6,
5948    UAVIONIX_ADSB_OUT_RESERVED = 7,
5949}
5950impl UavionixAdsbEmergencyStatus {
5951    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_NO_EMERGENCY;
5952}
5953impl Default for UavionixAdsbEmergencyStatus {
5954    fn default() -> Self {
5955        Self::DEFAULT
5956    }
5957}
5958#[cfg_attr(feature = "ts", derive(TS))]
5959#[cfg_attr(feature = "ts", ts(export))]
5960#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5962#[cfg_attr(feature = "serde", serde(tag = "type"))]
5963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5964#[repr(u32)]
5965#[doc = "Definitions for aircraft size"]
5966pub enum UavionixAdsbOutCfgAircraftSize {
5967    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_NO_DATA = 0,
5968    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L15M_W23M = 1,
5969    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L25M_W28P5M = 2,
5970    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L25_34M = 3,
5971    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L35_33M = 4,
5972    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L35_38M = 5,
5973    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L45_39P5M = 6,
5974    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L45_45M = 7,
5975    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L55_45M = 8,
5976    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L55_52M = 9,
5977    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L65_59P5M = 10,
5978    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L65_67M = 11,
5979    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L75_W72P5M = 12,
5980    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L75_W80M = 13,
5981    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L85_W80M = 14,
5982    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L85_W90M = 15,
5983}
5984impl UavionixAdsbOutCfgAircraftSize {
5985    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_NO_DATA;
5986}
5987impl Default for UavionixAdsbOutCfgAircraftSize {
5988    fn default() -> Self {
5989        Self::DEFAULT
5990    }
5991}
5992#[cfg_attr(feature = "ts", derive(TS))]
5993#[cfg_attr(feature = "ts", ts(export))]
5994#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5996#[cfg_attr(feature = "serde", serde(tag = "type"))]
5997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5998#[repr(u32)]
5999#[doc = "GPS lataral offset encoding"]
6000pub enum UavionixAdsbOutCfgGpsOffsetLat {
6001    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_NO_DATA = 0,
6002    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_2M = 1,
6003    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_4M = 2,
6004    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_6M = 3,
6005    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_0M = 4,
6006    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_2M = 5,
6007    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_4M = 6,
6008    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_6M = 7,
6009}
6010impl UavionixAdsbOutCfgGpsOffsetLat {
6011    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_NO_DATA;
6012}
6013impl Default for UavionixAdsbOutCfgGpsOffsetLat {
6014    fn default() -> Self {
6015        Self::DEFAULT
6016    }
6017}
6018#[cfg_attr(feature = "ts", derive(TS))]
6019#[cfg_attr(feature = "ts", ts(export))]
6020#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6022#[cfg_attr(feature = "serde", serde(tag = "type"))]
6023#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6024#[repr(u32)]
6025#[doc = "GPS longitudinal offset encoding"]
6026pub enum UavionixAdsbOutCfgGpsOffsetLon {
6027    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_NO_DATA = 0,
6028    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_APPLIED_BY_SENSOR = 1,
6029}
6030impl UavionixAdsbOutCfgGpsOffsetLon {
6031    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_NO_DATA;
6032}
6033impl Default for UavionixAdsbOutCfgGpsOffsetLon {
6034    fn default() -> Self {
6035        Self::DEFAULT
6036    }
6037}
6038bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder dynamic report"] pub struct UavionixAdsbOutControlState : u8 { const UAVIONIX_ADSB_OUT_CONTROL_STATE_EXTERNAL_BARO_CROSSCHECKED = 1 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_ON_GROUND = 4 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_IDENT_BUTTON_ACTIVE = 8 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_A_ENABLED = 16 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_C_ENABLED = 32 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_S_ENABLED = 64 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_1090ES_TX_ENABLED = 128 ; } }
6039impl UavionixAdsbOutControlState {
6040    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CONTROL_STATE_EXTERNAL_BARO_CROSSCHECKED;
6041}
6042impl Default for UavionixAdsbOutControlState {
6043    fn default() -> Self {
6044        Self::DEFAULT
6045    }
6046}
6047#[cfg_attr(feature = "ts", derive(TS))]
6048#[cfg_attr(feature = "ts", ts(export))]
6049#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6050#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6051#[cfg_attr(feature = "serde", serde(tag = "type"))]
6052#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6053#[repr(u32)]
6054#[doc = "Status for ADS-B transponder dynamic input"]
6055pub enum UavionixAdsbOutDynamicGpsFix {
6056    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_0 = 0,
6057    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_1 = 1,
6058    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_2D = 2,
6059    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_3D = 3,
6060    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_DGPS = 4,
6061    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_RTK = 5,
6062}
6063impl UavionixAdsbOutDynamicGpsFix {
6064    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_0;
6065}
6066impl Default for UavionixAdsbOutDynamicGpsFix {
6067    fn default() -> Self {
6068        Self::DEFAULT
6069    }
6070}
6071bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder dynamic report"] pub struct UavionixAdsbOutDynamicState : u16 { const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_INTENT_CHANGE = 1 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_AUTOPILOT_ENABLED = 2 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_NICBARO_CROSSCHECKED = 4 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_ON_GROUND = 8 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_IDENT = 16 ; } }
6072impl UavionixAdsbOutDynamicState {
6073    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_DYNAMIC_STATE_INTENT_CHANGE;
6074}
6075impl Default for UavionixAdsbOutDynamicState {
6076    fn default() -> Self {
6077        Self::DEFAULT
6078    }
6079}
6080bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Transceiver RF control flags for ADS-B transponder dynamic reports"] pub struct UavionixAdsbOutRfSelect : u8 { const UAVIONIX_ADSB_OUT_RF_SELECT_RX_ENABLED = 1 ; const UAVIONIX_ADSB_OUT_RF_SELECT_TX_ENABLED = 2 ; } }
6081impl UavionixAdsbOutRfSelect {
6082    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_RF_SELECT_RX_ENABLED;
6083}
6084impl Default for UavionixAdsbOutRfSelect {
6085    fn default() -> Self {
6086        Self::DEFAULT
6087    }
6088}
6089bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder fault report"] pub struct UavionixAdsbOutStatusFault : u8 { const UAVIONIX_ADSB_OUT_STATUS_FAULT_STATUS_MESSAGE_UNAVAIL = 8 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_GPS_NO_POS = 16 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_GPS_UNAVAIL = 32 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_TX_SYSTEM_FAIL = 64 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_MAINT_REQ = 128 ; } }
6090impl UavionixAdsbOutStatusFault {
6091    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_STATUS_FAULT_STATUS_MESSAGE_UNAVAIL;
6092}
6093impl Default for UavionixAdsbOutStatusFault {
6094    fn default() -> Self {
6095        Self::DEFAULT
6096    }
6097}
6098#[cfg_attr(feature = "ts", derive(TS))]
6099#[cfg_attr(feature = "ts", ts(export))]
6100#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6102#[cfg_attr(feature = "serde", serde(tag = "type"))]
6103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6104#[repr(u32)]
6105#[doc = "State flags for ADS-B transponder status report"]
6106pub enum UavionixAdsbOutStatusNicNacp {
6107    UAVIONIX_ADSB_NIC_CR_20_NM = 1,
6108    UAVIONIX_ADSB_NIC_CR_8_NM = 2,
6109    UAVIONIX_ADSB_NIC_CR_4_NM = 3,
6110    UAVIONIX_ADSB_NIC_CR_2_NM = 4,
6111    UAVIONIX_ADSB_NIC_CR_1_NM = 5,
6112    UAVIONIX_ADSB_NIC_CR_0_3_NM = 6,
6113    UAVIONIX_ADSB_NIC_CR_0_2_NM = 7,
6114    UAVIONIX_ADSB_NIC_CR_0_1_NM = 8,
6115    UAVIONIX_ADSB_NIC_CR_75_M = 9,
6116    UAVIONIX_ADSB_NIC_CR_25_M = 10,
6117    UAVIONIX_ADSB_NIC_CR_7_5_M = 11,
6118    UAVIONIX_ADSB_NACP_EPU_10_NM = 16,
6119    UAVIONIX_ADSB_NACP_EPU_4_NM = 32,
6120    UAVIONIX_ADSB_NACP_EPU_2_NM = 48,
6121    UAVIONIX_ADSB_NACP_EPU_1_NM = 64,
6122    UAVIONIX_ADSB_NACP_EPU_0_5_NM = 80,
6123    UAVIONIX_ADSB_NACP_EPU_0_3_NM = 96,
6124    UAVIONIX_ADSB_NACP_EPU_0_1_NM = 112,
6125    UAVIONIX_ADSB_NACP_EPU_0_05_NM = 128,
6126    UAVIONIX_ADSB_NACP_EPU_30_M = 144,
6127    UAVIONIX_ADSB_NACP_EPU_10_M = 160,
6128    UAVIONIX_ADSB_NACP_EPU_3_M = 176,
6129}
6130impl UavionixAdsbOutStatusNicNacp {
6131    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_NIC_CR_20_NM;
6132}
6133impl Default for UavionixAdsbOutStatusNicNacp {
6134    fn default() -> Self {
6135        Self::DEFAULT
6136    }
6137}
6138bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder status report"] pub struct UavionixAdsbOutStatusState : u8 { const UAVIONIX_ADSB_OUT_STATUS_STATE_ON_GROUND = 1 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_INTERROGATED_SINCE_LAST = 2 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_XBIT_ENABLED = 4 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_IDENT_ACTIVE = 8 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_A_ENABLED = 16 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_C_ENABLED = 32 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_S_ENABLED = 64 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_1090ES_TX_ENABLED = 128 ; } }
6139impl UavionixAdsbOutStatusState {
6140    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_STATUS_STATE_ON_GROUND;
6141}
6142impl Default for UavionixAdsbOutStatusState {
6143    fn default() -> Self {
6144        Self::DEFAULT
6145    }
6146}
6147bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Status flags for ADS-B transponder dynamic output"] pub struct UavionixAdsbRfHealth : u8 { const UAVIONIX_ADSB_RF_HEALTH_OK = 1 ; const UAVIONIX_ADSB_RF_HEALTH_FAIL_TX = 2 ; const UAVIONIX_ADSB_RF_HEALTH_FAIL_RX = 16 ; } }
6148impl UavionixAdsbRfHealth {
6149    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_RF_HEALTH_OK;
6150}
6151impl Default for UavionixAdsbRfHealth {
6152    fn default() -> Self {
6153        Self::DEFAULT
6154    }
6155}
6156bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for X-Bit and reserved fields."] pub struct UavionixAdsbXbit : u8 { const UAVIONIX_ADSB_XBIT_ENABLED = 128 ; } }
6157impl UavionixAdsbXbit {
6158    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_XBIT_ENABLED;
6159}
6160impl Default for UavionixAdsbXbit {
6161    fn default() -> Self {
6162        Self::DEFAULT
6163    }
6164}
6165bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
6166impl UtmDataAvailFlags {
6167    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
6168}
6169impl Default for UtmDataAvailFlags {
6170    fn default() -> Self {
6171        Self::DEFAULT
6172    }
6173}
6174#[cfg_attr(feature = "ts", derive(TS))]
6175#[cfg_attr(feature = "ts", ts(export))]
6176#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6178#[cfg_attr(feature = "serde", serde(tag = "type"))]
6179#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6180#[repr(u32)]
6181#[doc = "Airborne status of UAS."]
6182pub enum UtmFlightState {
6183    #[doc = "The flight state can't be determined."]
6184    UTM_FLIGHT_STATE_UNKNOWN = 1,
6185    #[doc = "UAS on ground."]
6186    UTM_FLIGHT_STATE_GROUND = 2,
6187    #[doc = "UAS airborne."]
6188    UTM_FLIGHT_STATE_AIRBORNE = 3,
6189    #[doc = "UAS is in an emergency flight state."]
6190    UTM_FLIGHT_STATE_EMERGENCY = 16,
6191    #[doc = "UAS has no active controls."]
6192    UTM_FLIGHT_STATE_NOCTRL = 32,
6193}
6194impl UtmFlightState {
6195    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
6196}
6197impl Default for UtmFlightState {
6198    fn default() -> Self {
6199        Self::DEFAULT
6200    }
6201}
6202#[cfg_attr(feature = "ts", derive(TS))]
6203#[cfg_attr(feature = "ts", ts(export))]
6204#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6206#[cfg_attr(feature = "serde", serde(tag = "type"))]
6207#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6208#[repr(u32)]
6209#[doc = "Video stream encodings"]
6210pub enum VideoStreamEncoding {
6211    #[doc = "Stream encoding is unknown"]
6212    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
6213    #[doc = "Stream encoding is H.264"]
6214    VIDEO_STREAM_ENCODING_H264 = 1,
6215    #[doc = "Stream encoding is H.265"]
6216    VIDEO_STREAM_ENCODING_H265 = 2,
6217}
6218impl VideoStreamEncoding {
6219    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
6220}
6221impl Default for VideoStreamEncoding {
6222    fn default() -> Self {
6223        Self::DEFAULT
6224    }
6225}
6226bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
6227impl VideoStreamStatusFlags {
6228    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
6229}
6230impl Default for VideoStreamStatusFlags {
6231    fn default() -> Self {
6232        Self::DEFAULT
6233    }
6234}
6235#[cfg_attr(feature = "ts", derive(TS))]
6236#[cfg_attr(feature = "ts", ts(export))]
6237#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6238#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6239#[cfg_attr(feature = "serde", serde(tag = "type"))]
6240#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6241#[repr(u32)]
6242#[doc = "Video stream types"]
6243pub enum VideoStreamType {
6244    #[doc = "Stream is RTSP"]
6245    VIDEO_STREAM_TYPE_RTSP = 0,
6246    #[doc = "Stream is RTP UDP (URI gives the port number)"]
6247    VIDEO_STREAM_TYPE_RTPUDP = 1,
6248    #[doc = "Stream is MPEG on TCP"]
6249    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
6250    #[doc = "Stream is MPEG TS (URI gives the port number)"]
6251    VIDEO_STREAM_TYPE_MPEG_TS = 3,
6252}
6253impl VideoStreamType {
6254    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
6255}
6256impl Default for VideoStreamType {
6257    fn default() -> Self {
6258        Self::DEFAULT
6259    }
6260}
6261#[cfg_attr(feature = "ts", derive(TS))]
6262#[cfg_attr(feature = "ts", ts(export))]
6263#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6265#[cfg_attr(feature = "serde", serde(tag = "type"))]
6266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6267#[repr(u32)]
6268#[doc = "Direction of VTOL transition"]
6269pub enum VtolTransitionHeading {
6270    #[doc = "Respect the heading configuration of the vehicle."]
6271    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
6272    #[doc = "Use the heading pointing towards the next waypoint."]
6273    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
6274    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
6275    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
6276    #[doc = "Use the specified heading in parameter 4."]
6277    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
6278    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
6279    VTOL_TRANSITION_HEADING_ANY = 4,
6280}
6281impl VtolTransitionHeading {
6282    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
6283}
6284impl Default for VtolTransitionHeading {
6285    fn default() -> Self {
6286        Self::DEFAULT
6287    }
6288}
6289#[cfg_attr(feature = "ts", derive(TS))]
6290#[cfg_attr(feature = "ts", ts(export))]
6291#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6293#[cfg_attr(feature = "serde", serde(tag = "type"))]
6294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6295#[repr(u32)]
6296#[doc = "WiFi Mode."]
6297pub enum WifiConfigApMode {
6298    #[doc = "WiFi mode is undefined."]
6299    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
6300    #[doc = "WiFi configured as an access point."]
6301    WIFI_CONFIG_AP_MODE_AP = 1,
6302    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
6303    WIFI_CONFIG_AP_MODE_STATION = 2,
6304    #[doc = "WiFi disabled."]
6305    WIFI_CONFIG_AP_MODE_DISABLED = 3,
6306}
6307impl WifiConfigApMode {
6308    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
6309}
6310impl Default for WifiConfigApMode {
6311    fn default() -> Self {
6312        Self::DEFAULT
6313    }
6314}
6315#[cfg_attr(feature = "ts", derive(TS))]
6316#[cfg_attr(feature = "ts", ts(export))]
6317#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6319#[cfg_attr(feature = "serde", serde(tag = "type"))]
6320#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6321#[repr(u32)]
6322#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
6323pub enum WifiConfigApResponse {
6324    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
6325    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
6326    #[doc = "Changes accepted."]
6327    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
6328    #[doc = "Changes rejected."]
6329    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
6330    #[doc = "Invalid Mode."]
6331    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
6332    #[doc = "Invalid SSID."]
6333    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
6334    #[doc = "Invalid Password."]
6335    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
6336}
6337impl WifiConfigApResponse {
6338    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
6339}
6340impl Default for WifiConfigApResponse {
6341    fn default() -> Self {
6342        Self::DEFAULT
6343    }
6344}
6345#[cfg_attr(feature = "ts", derive(TS))]
6346#[cfg_attr(feature = "ts", ts(export))]
6347#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6349#[cfg_attr(feature = "serde", serde(tag = "type"))]
6350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6351#[repr(u32)]
6352#[doc = "Winch actions."]
6353pub enum WinchActions {
6354    #[doc = "Allow motor to freewheel."]
6355    WINCH_RELAXED = 0,
6356    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
6357    WINCH_RELATIVE_LENGTH_CONTROL = 1,
6358    #[doc = "Wind or unwind line at specified rate."]
6359    WINCH_RATE_CONTROL = 2,
6360    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
6361    WINCH_LOCK = 3,
6362    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
6363    WINCH_DELIVER = 4,
6364    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
6365    WINCH_HOLD = 5,
6366    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
6367    WINCH_RETRACT = 6,
6368    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
6369    WINCH_LOAD_LINE = 7,
6370    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
6371    WINCH_ABANDON_LINE = 8,
6372    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
6373    WINCH_LOAD_PAYLOAD = 9,
6374}
6375impl WinchActions {
6376    pub const DEFAULT: Self = Self::WINCH_RELAXED;
6377}
6378impl Default for WinchActions {
6379    fn default() -> Self {
6380        Self::DEFAULT
6381    }
6382}
6383#[doc = "Set the vehicle attitude and body angular rates."]
6384#[doc = ""]
6385#[doc = "ID: 140"]
6386#[derive(Debug, Clone, PartialEq)]
6387#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6388#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6389#[cfg_attr(feature = "ts", derive(TS))]
6390#[cfg_attr(feature = "ts", ts(export))]
6391pub struct ACTUATOR_CONTROL_TARGET_DATA {
6392    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6393    pub time_usec: u64,
6394    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
6395    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6396    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6397    pub controls: [f32; 8],
6398    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
6399    pub group_mlx: u8,
6400}
6401impl ACTUATOR_CONTROL_TARGET_DATA {
6402    pub const ENCODED_LEN: usize = 41usize;
6403    pub const DEFAULT: Self = Self {
6404        time_usec: 0_u64,
6405        controls: [0.0_f32; 8usize],
6406        group_mlx: 0_u8,
6407    };
6408    #[cfg(feature = "arbitrary")]
6409    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6410        use arbitrary::{Arbitrary, Unstructured};
6411        let mut buf = [0u8; 1024];
6412        rng.fill_bytes(&mut buf);
6413        let mut unstructured = Unstructured::new(&buf);
6414        Self::arbitrary(&mut unstructured).unwrap_or_default()
6415    }
6416}
6417impl Default for ACTUATOR_CONTROL_TARGET_DATA {
6418    fn default() -> Self {
6419        Self::DEFAULT.clone()
6420    }
6421}
6422impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
6423    type Message = MavMessage;
6424    const ID: u32 = 140u32;
6425    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
6426    const EXTRA_CRC: u8 = 181u8;
6427    const ENCODED_LEN: usize = 41usize;
6428    fn deser(
6429        _version: MavlinkVersion,
6430        __input: &[u8],
6431    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6432        let avail_len = __input.len();
6433        let mut payload_buf = [0; Self::ENCODED_LEN];
6434        let mut buf = if avail_len < Self::ENCODED_LEN {
6435            payload_buf[0..avail_len].copy_from_slice(__input);
6436            Bytes::new(&payload_buf)
6437        } else {
6438            Bytes::new(__input)
6439        };
6440        let mut __struct = Self::default();
6441        __struct.time_usec = buf.get_u64_le()?;
6442        for v in &mut __struct.controls {
6443            let val = buf.get_f32_le()?;
6444            *v = val;
6445        }
6446        __struct.group_mlx = buf.get_u8()?;
6447        Ok(__struct)
6448    }
6449    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6450        let mut __tmp = BytesMut::new(bytes);
6451        #[allow(clippy::absurd_extreme_comparisons)]
6452        #[allow(unused_comparisons)]
6453        if __tmp.remaining() < Self::ENCODED_LEN {
6454            panic!(
6455                "buffer is too small (need {} bytes, but got {})",
6456                Self::ENCODED_LEN,
6457                __tmp.remaining(),
6458            )
6459        }
6460        __tmp.put_u64_le(self.time_usec);
6461        for val in &self.controls {
6462            __tmp.put_f32_le(*val);
6463        }
6464        __tmp.put_u8(self.group_mlx);
6465        if matches!(version, MavlinkVersion::V2) {
6466            let len = __tmp.len();
6467            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6468        } else {
6469            __tmp.len()
6470        }
6471    }
6472}
6473#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
6474#[doc = ""]
6475#[doc = "ID: 375"]
6476#[derive(Debug, Clone, PartialEq)]
6477#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6479#[cfg_attr(feature = "ts", derive(TS))]
6480#[cfg_attr(feature = "ts", ts(export))]
6481pub struct ACTUATOR_OUTPUT_STATUS_DATA {
6482    #[doc = "Timestamp (since system boot)."]
6483    pub time_usec: u64,
6484    #[doc = "Active outputs"]
6485    pub active: u32,
6486    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
6487    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6488    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6489    pub actuator: [f32; 32],
6490}
6491impl ACTUATOR_OUTPUT_STATUS_DATA {
6492    pub const ENCODED_LEN: usize = 140usize;
6493    pub const DEFAULT: Self = Self {
6494        time_usec: 0_u64,
6495        active: 0_u32,
6496        actuator: [0.0_f32; 32usize],
6497    };
6498    #[cfg(feature = "arbitrary")]
6499    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6500        use arbitrary::{Arbitrary, Unstructured};
6501        let mut buf = [0u8; 1024];
6502        rng.fill_bytes(&mut buf);
6503        let mut unstructured = Unstructured::new(&buf);
6504        Self::arbitrary(&mut unstructured).unwrap_or_default()
6505    }
6506}
6507impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
6508    fn default() -> Self {
6509        Self::DEFAULT.clone()
6510    }
6511}
6512impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
6513    type Message = MavMessage;
6514    const ID: u32 = 375u32;
6515    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
6516    const EXTRA_CRC: u8 = 251u8;
6517    const ENCODED_LEN: usize = 140usize;
6518    fn deser(
6519        _version: MavlinkVersion,
6520        __input: &[u8],
6521    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6522        let avail_len = __input.len();
6523        let mut payload_buf = [0; Self::ENCODED_LEN];
6524        let mut buf = if avail_len < Self::ENCODED_LEN {
6525            payload_buf[0..avail_len].copy_from_slice(__input);
6526            Bytes::new(&payload_buf)
6527        } else {
6528            Bytes::new(__input)
6529        };
6530        let mut __struct = Self::default();
6531        __struct.time_usec = buf.get_u64_le()?;
6532        __struct.active = buf.get_u32_le()?;
6533        for v in &mut __struct.actuator {
6534            let val = buf.get_f32_le()?;
6535            *v = val;
6536        }
6537        Ok(__struct)
6538    }
6539    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6540        let mut __tmp = BytesMut::new(bytes);
6541        #[allow(clippy::absurd_extreme_comparisons)]
6542        #[allow(unused_comparisons)]
6543        if __tmp.remaining() < Self::ENCODED_LEN {
6544            panic!(
6545                "buffer is too small (need {} bytes, but got {})",
6546                Self::ENCODED_LEN,
6547                __tmp.remaining(),
6548            )
6549        }
6550        __tmp.put_u64_le(self.time_usec);
6551        __tmp.put_u32_le(self.active);
6552        for val in &self.actuator {
6553            __tmp.put_f32_le(*val);
6554        }
6555        if matches!(version, MavlinkVersion::V2) {
6556            let len = __tmp.len();
6557            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6558        } else {
6559            __tmp.len()
6560        }
6561    }
6562}
6563#[doc = "Adaptive Controller tuning information."]
6564#[doc = ""]
6565#[doc = "ID: 11010"]
6566#[derive(Debug, Clone, PartialEq)]
6567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6568#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6569#[cfg_attr(feature = "ts", derive(TS))]
6570#[cfg_attr(feature = "ts", ts(export))]
6571pub struct ADAP_TUNING_DATA {
6572    #[doc = "Desired rate."]
6573    pub desired: f32,
6574    #[doc = "Achieved rate."]
6575    pub achieved: f32,
6576    #[doc = "Error between model and vehicle."]
6577    pub error: f32,
6578    #[doc = "Theta estimated state predictor."]
6579    pub theta: f32,
6580    #[doc = "Omega estimated state predictor."]
6581    pub omega: f32,
6582    #[doc = "Sigma estimated state predictor."]
6583    pub sigma: f32,
6584    #[doc = "Theta derivative."]
6585    pub theta_dot: f32,
6586    #[doc = "Omega derivative."]
6587    pub omega_dot: f32,
6588    #[doc = "Sigma derivative."]
6589    pub sigma_dot: f32,
6590    #[doc = "Projection operator value."]
6591    pub f: f32,
6592    #[doc = "Projection operator derivative."]
6593    pub f_dot: f32,
6594    #[doc = "u adaptive controlled output command."]
6595    pub u: f32,
6596    #[doc = "Axis."]
6597    pub axis: PidTuningAxis,
6598}
6599impl ADAP_TUNING_DATA {
6600    pub const ENCODED_LEN: usize = 49usize;
6601    pub const DEFAULT: Self = Self {
6602        desired: 0.0_f32,
6603        achieved: 0.0_f32,
6604        error: 0.0_f32,
6605        theta: 0.0_f32,
6606        omega: 0.0_f32,
6607        sigma: 0.0_f32,
6608        theta_dot: 0.0_f32,
6609        omega_dot: 0.0_f32,
6610        sigma_dot: 0.0_f32,
6611        f: 0.0_f32,
6612        f_dot: 0.0_f32,
6613        u: 0.0_f32,
6614        axis: PidTuningAxis::DEFAULT,
6615    };
6616    #[cfg(feature = "arbitrary")]
6617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6618        use arbitrary::{Arbitrary, Unstructured};
6619        let mut buf = [0u8; 1024];
6620        rng.fill_bytes(&mut buf);
6621        let mut unstructured = Unstructured::new(&buf);
6622        Self::arbitrary(&mut unstructured).unwrap_or_default()
6623    }
6624}
6625impl Default for ADAP_TUNING_DATA {
6626    fn default() -> Self {
6627        Self::DEFAULT.clone()
6628    }
6629}
6630impl MessageData for ADAP_TUNING_DATA {
6631    type Message = MavMessage;
6632    const ID: u32 = 11010u32;
6633    const NAME: &'static str = "ADAP_TUNING";
6634    const EXTRA_CRC: u8 = 46u8;
6635    const ENCODED_LEN: usize = 49usize;
6636    fn deser(
6637        _version: MavlinkVersion,
6638        __input: &[u8],
6639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6640        let avail_len = __input.len();
6641        let mut payload_buf = [0; Self::ENCODED_LEN];
6642        let mut buf = if avail_len < Self::ENCODED_LEN {
6643            payload_buf[0..avail_len].copy_from_slice(__input);
6644            Bytes::new(&payload_buf)
6645        } else {
6646            Bytes::new(__input)
6647        };
6648        let mut __struct = Self::default();
6649        __struct.desired = buf.get_f32_le()?;
6650        __struct.achieved = buf.get_f32_le()?;
6651        __struct.error = buf.get_f32_le()?;
6652        __struct.theta = buf.get_f32_le()?;
6653        __struct.omega = buf.get_f32_le()?;
6654        __struct.sigma = buf.get_f32_le()?;
6655        __struct.theta_dot = buf.get_f32_le()?;
6656        __struct.omega_dot = buf.get_f32_le()?;
6657        __struct.sigma_dot = buf.get_f32_le()?;
6658        __struct.f = buf.get_f32_le()?;
6659        __struct.f_dot = buf.get_f32_le()?;
6660        __struct.u = buf.get_f32_le()?;
6661        let tmp = buf.get_u8()?;
6662        __struct.axis =
6663            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6664                enum_type: "PidTuningAxis",
6665                value: tmp as u64,
6666            })?;
6667        Ok(__struct)
6668    }
6669    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6670        let mut __tmp = BytesMut::new(bytes);
6671        #[allow(clippy::absurd_extreme_comparisons)]
6672        #[allow(unused_comparisons)]
6673        if __tmp.remaining() < Self::ENCODED_LEN {
6674            panic!(
6675                "buffer is too small (need {} bytes, but got {})",
6676                Self::ENCODED_LEN,
6677                __tmp.remaining(),
6678            )
6679        }
6680        __tmp.put_f32_le(self.desired);
6681        __tmp.put_f32_le(self.achieved);
6682        __tmp.put_f32_le(self.error);
6683        __tmp.put_f32_le(self.theta);
6684        __tmp.put_f32_le(self.omega);
6685        __tmp.put_f32_le(self.sigma);
6686        __tmp.put_f32_le(self.theta_dot);
6687        __tmp.put_f32_le(self.omega_dot);
6688        __tmp.put_f32_le(self.sigma_dot);
6689        __tmp.put_f32_le(self.f);
6690        __tmp.put_f32_le(self.f_dot);
6691        __tmp.put_f32_le(self.u);
6692        __tmp.put_u8(self.axis as u8);
6693        if matches!(version, MavlinkVersion::V2) {
6694            let len = __tmp.len();
6695            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6696        } else {
6697            __tmp.len()
6698        }
6699    }
6700}
6701#[doc = "The location and information of an ADSB vehicle."]
6702#[doc = ""]
6703#[doc = "ID: 246"]
6704#[derive(Debug, Clone, PartialEq)]
6705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6706#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6707#[cfg_attr(feature = "ts", derive(TS))]
6708#[cfg_attr(feature = "ts", ts(export))]
6709pub struct ADSB_VEHICLE_DATA {
6710    #[doc = "ICAO address"]
6711    pub ICAO_address: u32,
6712    #[doc = "Latitude"]
6713    pub lat: i32,
6714    #[doc = "Longitude"]
6715    pub lon: i32,
6716    #[doc = "Altitude(ASL)"]
6717    pub altitude: i32,
6718    #[doc = "Course over ground"]
6719    pub heading: u16,
6720    #[doc = "The horizontal velocity"]
6721    pub hor_velocity: u16,
6722    #[doc = "The vertical velocity. Positive is up"]
6723    pub ver_velocity: i16,
6724    #[doc = "Bitmap to indicate various statuses including valid data fields"]
6725    pub flags: AdsbFlags,
6726    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
6727    pub squawk: u16,
6728    #[doc = "ADSB altitude type."]
6729    pub altitude_type: AdsbAltitudeType,
6730    #[doc = "The callsign, 8+null"]
6731    #[cfg_attr(feature = "ts", ts(type = "string"))]
6732    pub callsign: CharArray<9>,
6733    #[doc = "ADSB emitter type."]
6734    pub emitter_type: AdsbEmitterType,
6735    #[doc = "Time since last communication in seconds"]
6736    pub tslc: u8,
6737}
6738impl ADSB_VEHICLE_DATA {
6739    pub const ENCODED_LEN: usize = 38usize;
6740    pub const DEFAULT: Self = Self {
6741        ICAO_address: 0_u32,
6742        lat: 0_i32,
6743        lon: 0_i32,
6744        altitude: 0_i32,
6745        heading: 0_u16,
6746        hor_velocity: 0_u16,
6747        ver_velocity: 0_i16,
6748        flags: AdsbFlags::DEFAULT,
6749        squawk: 0_u16,
6750        altitude_type: AdsbAltitudeType::DEFAULT,
6751        callsign: CharArray::new([0_u8; 9usize]),
6752        emitter_type: AdsbEmitterType::DEFAULT,
6753        tslc: 0_u8,
6754    };
6755    #[cfg(feature = "arbitrary")]
6756    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6757        use arbitrary::{Arbitrary, Unstructured};
6758        let mut buf = [0u8; 1024];
6759        rng.fill_bytes(&mut buf);
6760        let mut unstructured = Unstructured::new(&buf);
6761        Self::arbitrary(&mut unstructured).unwrap_or_default()
6762    }
6763}
6764impl Default for ADSB_VEHICLE_DATA {
6765    fn default() -> Self {
6766        Self::DEFAULT.clone()
6767    }
6768}
6769impl MessageData for ADSB_VEHICLE_DATA {
6770    type Message = MavMessage;
6771    const ID: u32 = 246u32;
6772    const NAME: &'static str = "ADSB_VEHICLE";
6773    const EXTRA_CRC: u8 = 184u8;
6774    const ENCODED_LEN: usize = 38usize;
6775    fn deser(
6776        _version: MavlinkVersion,
6777        __input: &[u8],
6778    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6779        let avail_len = __input.len();
6780        let mut payload_buf = [0; Self::ENCODED_LEN];
6781        let mut buf = if avail_len < Self::ENCODED_LEN {
6782            payload_buf[0..avail_len].copy_from_slice(__input);
6783            Bytes::new(&payload_buf)
6784        } else {
6785            Bytes::new(__input)
6786        };
6787        let mut __struct = Self::default();
6788        __struct.ICAO_address = buf.get_u32_le()?;
6789        __struct.lat = buf.get_i32_le()?;
6790        __struct.lon = buf.get_i32_le()?;
6791        __struct.altitude = buf.get_i32_le()?;
6792        __struct.heading = buf.get_u16_le()?;
6793        __struct.hor_velocity = buf.get_u16_le()?;
6794        __struct.ver_velocity = buf.get_i16_le()?;
6795        let tmp = buf.get_u16_le()?;
6796        __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
6797            ::mavlink_core::error::ParserError::InvalidFlag {
6798                flag_type: "AdsbFlags",
6799                value: tmp as u64,
6800            },
6801        )?;
6802        __struct.squawk = buf.get_u16_le()?;
6803        let tmp = buf.get_u8()?;
6804        __struct.altitude_type =
6805            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6806                enum_type: "AdsbAltitudeType",
6807                value: tmp as u64,
6808            })?;
6809        let mut tmp = [0_u8; 9usize];
6810        for v in &mut tmp {
6811            *v = buf.get_u8()?;
6812        }
6813        __struct.callsign = CharArray::new(tmp);
6814        let tmp = buf.get_u8()?;
6815        __struct.emitter_type =
6816            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6817                enum_type: "AdsbEmitterType",
6818                value: tmp as u64,
6819            })?;
6820        __struct.tslc = buf.get_u8()?;
6821        Ok(__struct)
6822    }
6823    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6824        let mut __tmp = BytesMut::new(bytes);
6825        #[allow(clippy::absurd_extreme_comparisons)]
6826        #[allow(unused_comparisons)]
6827        if __tmp.remaining() < Self::ENCODED_LEN {
6828            panic!(
6829                "buffer is too small (need {} bytes, but got {})",
6830                Self::ENCODED_LEN,
6831                __tmp.remaining(),
6832            )
6833        }
6834        __tmp.put_u32_le(self.ICAO_address);
6835        __tmp.put_i32_le(self.lat);
6836        __tmp.put_i32_le(self.lon);
6837        __tmp.put_i32_le(self.altitude);
6838        __tmp.put_u16_le(self.heading);
6839        __tmp.put_u16_le(self.hor_velocity);
6840        __tmp.put_i16_le(self.ver_velocity);
6841        __tmp.put_u16_le(self.flags.bits() as u16);
6842        __tmp.put_u16_le(self.squawk);
6843        __tmp.put_u8(self.altitude_type as u8);
6844        for val in &self.callsign {
6845            __tmp.put_u8(*val);
6846        }
6847        __tmp.put_u8(self.emitter_type as u8);
6848        __tmp.put_u8(self.tslc);
6849        if matches!(version, MavlinkVersion::V2) {
6850            let len = __tmp.len();
6851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6852        } else {
6853            __tmp.len()
6854        }
6855    }
6856}
6857#[doc = "Status of DCM attitude estimator."]
6858#[doc = ""]
6859#[doc = "ID: 163"]
6860#[derive(Debug, Clone, PartialEq)]
6861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6863#[cfg_attr(feature = "ts", derive(TS))]
6864#[cfg_attr(feature = "ts", ts(export))]
6865pub struct AHRS_DATA {
6866    #[doc = "X gyro drift estimate."]
6867    pub omegaIx: f32,
6868    #[doc = "Y gyro drift estimate."]
6869    pub omegaIy: f32,
6870    #[doc = "Z gyro drift estimate."]
6871    pub omegaIz: f32,
6872    #[doc = "Average accel_weight."]
6873    pub accel_weight: f32,
6874    #[doc = "Average renormalisation value."]
6875    pub renorm_val: f32,
6876    #[doc = "Average error_roll_pitch value."]
6877    pub error_rp: f32,
6878    #[doc = "Average error_yaw value."]
6879    pub error_yaw: f32,
6880}
6881impl AHRS_DATA {
6882    pub const ENCODED_LEN: usize = 28usize;
6883    pub const DEFAULT: Self = Self {
6884        omegaIx: 0.0_f32,
6885        omegaIy: 0.0_f32,
6886        omegaIz: 0.0_f32,
6887        accel_weight: 0.0_f32,
6888        renorm_val: 0.0_f32,
6889        error_rp: 0.0_f32,
6890        error_yaw: 0.0_f32,
6891    };
6892    #[cfg(feature = "arbitrary")]
6893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6894        use arbitrary::{Arbitrary, Unstructured};
6895        let mut buf = [0u8; 1024];
6896        rng.fill_bytes(&mut buf);
6897        let mut unstructured = Unstructured::new(&buf);
6898        Self::arbitrary(&mut unstructured).unwrap_or_default()
6899    }
6900}
6901impl Default for AHRS_DATA {
6902    fn default() -> Self {
6903        Self::DEFAULT.clone()
6904    }
6905}
6906impl MessageData for AHRS_DATA {
6907    type Message = MavMessage;
6908    const ID: u32 = 163u32;
6909    const NAME: &'static str = "AHRS";
6910    const EXTRA_CRC: u8 = 127u8;
6911    const ENCODED_LEN: usize = 28usize;
6912    fn deser(
6913        _version: MavlinkVersion,
6914        __input: &[u8],
6915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6916        let avail_len = __input.len();
6917        let mut payload_buf = [0; Self::ENCODED_LEN];
6918        let mut buf = if avail_len < Self::ENCODED_LEN {
6919            payload_buf[0..avail_len].copy_from_slice(__input);
6920            Bytes::new(&payload_buf)
6921        } else {
6922            Bytes::new(__input)
6923        };
6924        let mut __struct = Self::default();
6925        __struct.omegaIx = buf.get_f32_le()?;
6926        __struct.omegaIy = buf.get_f32_le()?;
6927        __struct.omegaIz = buf.get_f32_le()?;
6928        __struct.accel_weight = buf.get_f32_le()?;
6929        __struct.renorm_val = buf.get_f32_le()?;
6930        __struct.error_rp = buf.get_f32_le()?;
6931        __struct.error_yaw = buf.get_f32_le()?;
6932        Ok(__struct)
6933    }
6934    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6935        let mut __tmp = BytesMut::new(bytes);
6936        #[allow(clippy::absurd_extreme_comparisons)]
6937        #[allow(unused_comparisons)]
6938        if __tmp.remaining() < Self::ENCODED_LEN {
6939            panic!(
6940                "buffer is too small (need {} bytes, but got {})",
6941                Self::ENCODED_LEN,
6942                __tmp.remaining(),
6943            )
6944        }
6945        __tmp.put_f32_le(self.omegaIx);
6946        __tmp.put_f32_le(self.omegaIy);
6947        __tmp.put_f32_le(self.omegaIz);
6948        __tmp.put_f32_le(self.accel_weight);
6949        __tmp.put_f32_le(self.renorm_val);
6950        __tmp.put_f32_le(self.error_rp);
6951        __tmp.put_f32_le(self.error_yaw);
6952        if matches!(version, MavlinkVersion::V2) {
6953            let len = __tmp.len();
6954            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6955        } else {
6956            __tmp.len()
6957        }
6958    }
6959}
6960#[doc = "Status of secondary AHRS filter if available."]
6961#[doc = ""]
6962#[doc = "ID: 178"]
6963#[derive(Debug, Clone, PartialEq)]
6964#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6966#[cfg_attr(feature = "ts", derive(TS))]
6967#[cfg_attr(feature = "ts", ts(export))]
6968pub struct AHRS2_DATA {
6969    #[doc = "Roll angle."]
6970    pub roll: f32,
6971    #[doc = "Pitch angle."]
6972    pub pitch: f32,
6973    #[doc = "Yaw angle."]
6974    pub yaw: f32,
6975    #[doc = "Altitude (MSL)."]
6976    pub altitude: f32,
6977    #[doc = "Latitude."]
6978    pub lat: i32,
6979    #[doc = "Longitude."]
6980    pub lng: i32,
6981}
6982impl AHRS2_DATA {
6983    pub const ENCODED_LEN: usize = 24usize;
6984    pub const DEFAULT: Self = Self {
6985        roll: 0.0_f32,
6986        pitch: 0.0_f32,
6987        yaw: 0.0_f32,
6988        altitude: 0.0_f32,
6989        lat: 0_i32,
6990        lng: 0_i32,
6991    };
6992    #[cfg(feature = "arbitrary")]
6993    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6994        use arbitrary::{Arbitrary, Unstructured};
6995        let mut buf = [0u8; 1024];
6996        rng.fill_bytes(&mut buf);
6997        let mut unstructured = Unstructured::new(&buf);
6998        Self::arbitrary(&mut unstructured).unwrap_or_default()
6999    }
7000}
7001impl Default for AHRS2_DATA {
7002    fn default() -> Self {
7003        Self::DEFAULT.clone()
7004    }
7005}
7006impl MessageData for AHRS2_DATA {
7007    type Message = MavMessage;
7008    const ID: u32 = 178u32;
7009    const NAME: &'static str = "AHRS2";
7010    const EXTRA_CRC: u8 = 47u8;
7011    const ENCODED_LEN: usize = 24usize;
7012    fn deser(
7013        _version: MavlinkVersion,
7014        __input: &[u8],
7015    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7016        let avail_len = __input.len();
7017        let mut payload_buf = [0; Self::ENCODED_LEN];
7018        let mut buf = if avail_len < Self::ENCODED_LEN {
7019            payload_buf[0..avail_len].copy_from_slice(__input);
7020            Bytes::new(&payload_buf)
7021        } else {
7022            Bytes::new(__input)
7023        };
7024        let mut __struct = Self::default();
7025        __struct.roll = buf.get_f32_le()?;
7026        __struct.pitch = buf.get_f32_le()?;
7027        __struct.yaw = buf.get_f32_le()?;
7028        __struct.altitude = buf.get_f32_le()?;
7029        __struct.lat = buf.get_i32_le()?;
7030        __struct.lng = buf.get_i32_le()?;
7031        Ok(__struct)
7032    }
7033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7034        let mut __tmp = BytesMut::new(bytes);
7035        #[allow(clippy::absurd_extreme_comparisons)]
7036        #[allow(unused_comparisons)]
7037        if __tmp.remaining() < Self::ENCODED_LEN {
7038            panic!(
7039                "buffer is too small (need {} bytes, but got {})",
7040                Self::ENCODED_LEN,
7041                __tmp.remaining(),
7042            )
7043        }
7044        __tmp.put_f32_le(self.roll);
7045        __tmp.put_f32_le(self.pitch);
7046        __tmp.put_f32_le(self.yaw);
7047        __tmp.put_f32_le(self.altitude);
7048        __tmp.put_i32_le(self.lat);
7049        __tmp.put_i32_le(self.lng);
7050        if matches!(version, MavlinkVersion::V2) {
7051            let len = __tmp.len();
7052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7053        } else {
7054            __tmp.len()
7055        }
7056    }
7057}
7058#[doc = "Status of third AHRS filter if available. This is for ANU research group (Ali and Sean)."]
7059#[doc = ""]
7060#[doc = "ID: 182"]
7061#[derive(Debug, Clone, PartialEq)]
7062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7064#[cfg_attr(feature = "ts", derive(TS))]
7065#[cfg_attr(feature = "ts", ts(export))]
7066pub struct AHRS3_DATA {
7067    #[doc = "Roll angle."]
7068    pub roll: f32,
7069    #[doc = "Pitch angle."]
7070    pub pitch: f32,
7071    #[doc = "Yaw angle."]
7072    pub yaw: f32,
7073    #[doc = "Altitude (MSL)."]
7074    pub altitude: f32,
7075    #[doc = "Latitude."]
7076    pub lat: i32,
7077    #[doc = "Longitude."]
7078    pub lng: i32,
7079    #[doc = "Test variable1."]
7080    pub v1: f32,
7081    #[doc = "Test variable2."]
7082    pub v2: f32,
7083    #[doc = "Test variable3."]
7084    pub v3: f32,
7085    #[doc = "Test variable4."]
7086    pub v4: f32,
7087}
7088impl AHRS3_DATA {
7089    pub const ENCODED_LEN: usize = 40usize;
7090    pub const DEFAULT: Self = Self {
7091        roll: 0.0_f32,
7092        pitch: 0.0_f32,
7093        yaw: 0.0_f32,
7094        altitude: 0.0_f32,
7095        lat: 0_i32,
7096        lng: 0_i32,
7097        v1: 0.0_f32,
7098        v2: 0.0_f32,
7099        v3: 0.0_f32,
7100        v4: 0.0_f32,
7101    };
7102    #[cfg(feature = "arbitrary")]
7103    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7104        use arbitrary::{Arbitrary, Unstructured};
7105        let mut buf = [0u8; 1024];
7106        rng.fill_bytes(&mut buf);
7107        let mut unstructured = Unstructured::new(&buf);
7108        Self::arbitrary(&mut unstructured).unwrap_or_default()
7109    }
7110}
7111impl Default for AHRS3_DATA {
7112    fn default() -> Self {
7113        Self::DEFAULT.clone()
7114    }
7115}
7116impl MessageData for AHRS3_DATA {
7117    type Message = MavMessage;
7118    const ID: u32 = 182u32;
7119    const NAME: &'static str = "AHRS3";
7120    const EXTRA_CRC: u8 = 229u8;
7121    const ENCODED_LEN: usize = 40usize;
7122    fn deser(
7123        _version: MavlinkVersion,
7124        __input: &[u8],
7125    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7126        let avail_len = __input.len();
7127        let mut payload_buf = [0; Self::ENCODED_LEN];
7128        let mut buf = if avail_len < Self::ENCODED_LEN {
7129            payload_buf[0..avail_len].copy_from_slice(__input);
7130            Bytes::new(&payload_buf)
7131        } else {
7132            Bytes::new(__input)
7133        };
7134        let mut __struct = Self::default();
7135        __struct.roll = buf.get_f32_le()?;
7136        __struct.pitch = buf.get_f32_le()?;
7137        __struct.yaw = buf.get_f32_le()?;
7138        __struct.altitude = buf.get_f32_le()?;
7139        __struct.lat = buf.get_i32_le()?;
7140        __struct.lng = buf.get_i32_le()?;
7141        __struct.v1 = buf.get_f32_le()?;
7142        __struct.v2 = buf.get_f32_le()?;
7143        __struct.v3 = buf.get_f32_le()?;
7144        __struct.v4 = buf.get_f32_le()?;
7145        Ok(__struct)
7146    }
7147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7148        let mut __tmp = BytesMut::new(bytes);
7149        #[allow(clippy::absurd_extreme_comparisons)]
7150        #[allow(unused_comparisons)]
7151        if __tmp.remaining() < Self::ENCODED_LEN {
7152            panic!(
7153                "buffer is too small (need {} bytes, but got {})",
7154                Self::ENCODED_LEN,
7155                __tmp.remaining(),
7156            )
7157        }
7158        __tmp.put_f32_le(self.roll);
7159        __tmp.put_f32_le(self.pitch);
7160        __tmp.put_f32_le(self.yaw);
7161        __tmp.put_f32_le(self.altitude);
7162        __tmp.put_i32_le(self.lat);
7163        __tmp.put_i32_le(self.lng);
7164        __tmp.put_f32_le(self.v1);
7165        __tmp.put_f32_le(self.v2);
7166        __tmp.put_f32_le(self.v3);
7167        __tmp.put_f32_le(self.v4);
7168        if matches!(version, MavlinkVersion::V2) {
7169            let len = __tmp.len();
7170            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7171        } else {
7172            __tmp.len()
7173        }
7174    }
7175}
7176#[doc = "Authorization package."]
7177#[doc = ""]
7178#[doc = "ID: 52000"]
7179#[derive(Debug, Clone, PartialEq)]
7180#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7182#[cfg_attr(feature = "ts", derive(TS))]
7183#[cfg_attr(feature = "ts", ts(export))]
7184pub struct AIRLINK_AUTH_DATA {
7185    #[doc = "Login"]
7186    #[cfg_attr(feature = "ts", ts(type = "string"))]
7187    pub login: CharArray<50>,
7188    #[doc = "Password"]
7189    #[cfg_attr(feature = "ts", ts(type = "string"))]
7190    pub password: CharArray<50>,
7191}
7192impl AIRLINK_AUTH_DATA {
7193    pub const ENCODED_LEN: usize = 100usize;
7194    pub const DEFAULT: Self = Self {
7195        login: CharArray::new([0_u8; 50usize]),
7196        password: CharArray::new([0_u8; 50usize]),
7197    };
7198    #[cfg(feature = "arbitrary")]
7199    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7200        use arbitrary::{Arbitrary, Unstructured};
7201        let mut buf = [0u8; 1024];
7202        rng.fill_bytes(&mut buf);
7203        let mut unstructured = Unstructured::new(&buf);
7204        Self::arbitrary(&mut unstructured).unwrap_or_default()
7205    }
7206}
7207impl Default for AIRLINK_AUTH_DATA {
7208    fn default() -> Self {
7209        Self::DEFAULT.clone()
7210    }
7211}
7212impl MessageData for AIRLINK_AUTH_DATA {
7213    type Message = MavMessage;
7214    const ID: u32 = 52000u32;
7215    const NAME: &'static str = "AIRLINK_AUTH";
7216    const EXTRA_CRC: u8 = 13u8;
7217    const ENCODED_LEN: usize = 100usize;
7218    fn deser(
7219        _version: MavlinkVersion,
7220        __input: &[u8],
7221    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7222        let avail_len = __input.len();
7223        let mut payload_buf = [0; Self::ENCODED_LEN];
7224        let mut buf = if avail_len < Self::ENCODED_LEN {
7225            payload_buf[0..avail_len].copy_from_slice(__input);
7226            Bytes::new(&payload_buf)
7227        } else {
7228            Bytes::new(__input)
7229        };
7230        let mut __struct = Self::default();
7231        let mut tmp = [0_u8; 50usize];
7232        for v in &mut tmp {
7233            *v = buf.get_u8()?;
7234        }
7235        __struct.login = CharArray::new(tmp);
7236        let mut tmp = [0_u8; 50usize];
7237        for v in &mut tmp {
7238            *v = buf.get_u8()?;
7239        }
7240        __struct.password = CharArray::new(tmp);
7241        Ok(__struct)
7242    }
7243    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7244        let mut __tmp = BytesMut::new(bytes);
7245        #[allow(clippy::absurd_extreme_comparisons)]
7246        #[allow(unused_comparisons)]
7247        if __tmp.remaining() < Self::ENCODED_LEN {
7248            panic!(
7249                "buffer is too small (need {} bytes, but got {})",
7250                Self::ENCODED_LEN,
7251                __tmp.remaining(),
7252            )
7253        }
7254        for val in &self.login {
7255            __tmp.put_u8(*val);
7256        }
7257        for val in &self.password {
7258            __tmp.put_u8(*val);
7259        }
7260        if matches!(version, MavlinkVersion::V2) {
7261            let len = __tmp.len();
7262            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7263        } else {
7264            __tmp.len()
7265        }
7266    }
7267}
7268#[doc = "Response to the authorization request."]
7269#[doc = ""]
7270#[doc = "ID: 52001"]
7271#[derive(Debug, Clone, PartialEq)]
7272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7274#[cfg_attr(feature = "ts", derive(TS))]
7275#[cfg_attr(feature = "ts", ts(export))]
7276pub struct AIRLINK_AUTH_RESPONSE_DATA {
7277    #[doc = "Response type"]
7278    pub resp_type: AirlinkAuthResponseType,
7279}
7280impl AIRLINK_AUTH_RESPONSE_DATA {
7281    pub const ENCODED_LEN: usize = 1usize;
7282    pub const DEFAULT: Self = Self {
7283        resp_type: AirlinkAuthResponseType::DEFAULT,
7284    };
7285    #[cfg(feature = "arbitrary")]
7286    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7287        use arbitrary::{Arbitrary, Unstructured};
7288        let mut buf = [0u8; 1024];
7289        rng.fill_bytes(&mut buf);
7290        let mut unstructured = Unstructured::new(&buf);
7291        Self::arbitrary(&mut unstructured).unwrap_or_default()
7292    }
7293}
7294impl Default for AIRLINK_AUTH_RESPONSE_DATA {
7295    fn default() -> Self {
7296        Self::DEFAULT.clone()
7297    }
7298}
7299impl MessageData for AIRLINK_AUTH_RESPONSE_DATA {
7300    type Message = MavMessage;
7301    const ID: u32 = 52001u32;
7302    const NAME: &'static str = "AIRLINK_AUTH_RESPONSE";
7303    const EXTRA_CRC: u8 = 239u8;
7304    const ENCODED_LEN: usize = 1usize;
7305    fn deser(
7306        _version: MavlinkVersion,
7307        __input: &[u8],
7308    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7309        let avail_len = __input.len();
7310        let mut payload_buf = [0; Self::ENCODED_LEN];
7311        let mut buf = if avail_len < Self::ENCODED_LEN {
7312            payload_buf[0..avail_len].copy_from_slice(__input);
7313            Bytes::new(&payload_buf)
7314        } else {
7315            Bytes::new(__input)
7316        };
7317        let mut __struct = Self::default();
7318        let tmp = buf.get_u8()?;
7319        __struct.resp_type =
7320            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7321                enum_type: "AirlinkAuthResponseType",
7322                value: tmp as u64,
7323            })?;
7324        Ok(__struct)
7325    }
7326    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7327        let mut __tmp = BytesMut::new(bytes);
7328        #[allow(clippy::absurd_extreme_comparisons)]
7329        #[allow(unused_comparisons)]
7330        if __tmp.remaining() < Self::ENCODED_LEN {
7331            panic!(
7332                "buffer is too small (need {} bytes, but got {})",
7333                Self::ENCODED_LEN,
7334                __tmp.remaining(),
7335            )
7336        }
7337        __tmp.put_u8(self.resp_type as u8);
7338        if matches!(version, MavlinkVersion::V2) {
7339            let len = __tmp.len();
7340            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7341        } else {
7342            __tmp.len()
7343        }
7344    }
7345}
7346#[doc = "Airspeed auto-calibration."]
7347#[doc = ""]
7348#[doc = "ID: 174"]
7349#[derive(Debug, Clone, PartialEq)]
7350#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7352#[cfg_attr(feature = "ts", derive(TS))]
7353#[cfg_attr(feature = "ts", ts(export))]
7354pub struct AIRSPEED_AUTOCAL_DATA {
7355    #[doc = "GPS velocity north."]
7356    pub vx: f32,
7357    #[doc = "GPS velocity east."]
7358    pub vy: f32,
7359    #[doc = "GPS velocity down."]
7360    pub vz: f32,
7361    #[doc = "Differential pressure."]
7362    pub diff_pressure: f32,
7363    #[doc = "Estimated to true airspeed ratio."]
7364    pub EAS2TAS: f32,
7365    #[doc = "Airspeed ratio."]
7366    pub ratio: f32,
7367    #[doc = "EKF state x."]
7368    pub state_x: f32,
7369    #[doc = "EKF state y."]
7370    pub state_y: f32,
7371    #[doc = "EKF state z."]
7372    pub state_z: f32,
7373    #[doc = "EKF Pax."]
7374    pub Pax: f32,
7375    #[doc = "EKF Pby."]
7376    pub Pby: f32,
7377    #[doc = "EKF Pcz."]
7378    pub Pcz: f32,
7379}
7380impl AIRSPEED_AUTOCAL_DATA {
7381    pub const ENCODED_LEN: usize = 48usize;
7382    pub const DEFAULT: Self = Self {
7383        vx: 0.0_f32,
7384        vy: 0.0_f32,
7385        vz: 0.0_f32,
7386        diff_pressure: 0.0_f32,
7387        EAS2TAS: 0.0_f32,
7388        ratio: 0.0_f32,
7389        state_x: 0.0_f32,
7390        state_y: 0.0_f32,
7391        state_z: 0.0_f32,
7392        Pax: 0.0_f32,
7393        Pby: 0.0_f32,
7394        Pcz: 0.0_f32,
7395    };
7396    #[cfg(feature = "arbitrary")]
7397    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7398        use arbitrary::{Arbitrary, Unstructured};
7399        let mut buf = [0u8; 1024];
7400        rng.fill_bytes(&mut buf);
7401        let mut unstructured = Unstructured::new(&buf);
7402        Self::arbitrary(&mut unstructured).unwrap_or_default()
7403    }
7404}
7405impl Default for AIRSPEED_AUTOCAL_DATA {
7406    fn default() -> Self {
7407        Self::DEFAULT.clone()
7408    }
7409}
7410impl MessageData for AIRSPEED_AUTOCAL_DATA {
7411    type Message = MavMessage;
7412    const ID: u32 = 174u32;
7413    const NAME: &'static str = "AIRSPEED_AUTOCAL";
7414    const EXTRA_CRC: u8 = 167u8;
7415    const ENCODED_LEN: usize = 48usize;
7416    fn deser(
7417        _version: MavlinkVersion,
7418        __input: &[u8],
7419    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7420        let avail_len = __input.len();
7421        let mut payload_buf = [0; Self::ENCODED_LEN];
7422        let mut buf = if avail_len < Self::ENCODED_LEN {
7423            payload_buf[0..avail_len].copy_from_slice(__input);
7424            Bytes::new(&payload_buf)
7425        } else {
7426            Bytes::new(__input)
7427        };
7428        let mut __struct = Self::default();
7429        __struct.vx = buf.get_f32_le()?;
7430        __struct.vy = buf.get_f32_le()?;
7431        __struct.vz = buf.get_f32_le()?;
7432        __struct.diff_pressure = buf.get_f32_le()?;
7433        __struct.EAS2TAS = buf.get_f32_le()?;
7434        __struct.ratio = buf.get_f32_le()?;
7435        __struct.state_x = buf.get_f32_le()?;
7436        __struct.state_y = buf.get_f32_le()?;
7437        __struct.state_z = buf.get_f32_le()?;
7438        __struct.Pax = buf.get_f32_le()?;
7439        __struct.Pby = buf.get_f32_le()?;
7440        __struct.Pcz = buf.get_f32_le()?;
7441        Ok(__struct)
7442    }
7443    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7444        let mut __tmp = BytesMut::new(bytes);
7445        #[allow(clippy::absurd_extreme_comparisons)]
7446        #[allow(unused_comparisons)]
7447        if __tmp.remaining() < Self::ENCODED_LEN {
7448            panic!(
7449                "buffer is too small (need {} bytes, but got {})",
7450                Self::ENCODED_LEN,
7451                __tmp.remaining(),
7452            )
7453        }
7454        __tmp.put_f32_le(self.vx);
7455        __tmp.put_f32_le(self.vy);
7456        __tmp.put_f32_le(self.vz);
7457        __tmp.put_f32_le(self.diff_pressure);
7458        __tmp.put_f32_le(self.EAS2TAS);
7459        __tmp.put_f32_le(self.ratio);
7460        __tmp.put_f32_le(self.state_x);
7461        __tmp.put_f32_le(self.state_y);
7462        __tmp.put_f32_le(self.state_z);
7463        __tmp.put_f32_le(self.Pax);
7464        __tmp.put_f32_le(self.Pby);
7465        __tmp.put_f32_le(self.Pcz);
7466        if matches!(version, MavlinkVersion::V2) {
7467            let len = __tmp.len();
7468            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7469        } else {
7470            __tmp.len()
7471        }
7472    }
7473}
7474#[doc = "The location and information of an AIS vessel."]
7475#[doc = ""]
7476#[doc = "ID: 301"]
7477#[derive(Debug, Clone, PartialEq)]
7478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7479#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7480#[cfg_attr(feature = "ts", derive(TS))]
7481#[cfg_attr(feature = "ts", ts(export))]
7482pub struct AIS_VESSEL_DATA {
7483    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
7484    pub MMSI: u32,
7485    #[doc = "Latitude"]
7486    pub lat: i32,
7487    #[doc = "Longitude"]
7488    pub lon: i32,
7489    #[doc = "Course over ground"]
7490    pub COG: u16,
7491    #[doc = "True heading"]
7492    pub heading: u16,
7493    #[doc = "Speed over ground"]
7494    pub velocity: u16,
7495    #[doc = "Distance from lat/lon location to bow"]
7496    pub dimension_bow: u16,
7497    #[doc = "Distance from lat/lon location to stern"]
7498    pub dimension_stern: u16,
7499    #[doc = "Time since last communication in seconds"]
7500    pub tslc: u16,
7501    #[doc = "Bitmask to indicate various statuses including valid data fields"]
7502    pub flags: AisFlags,
7503    #[doc = "Turn rate"]
7504    pub turn_rate: i8,
7505    #[doc = "Navigational status"]
7506    pub navigational_status: AisNavStatus,
7507    #[doc = "Type of vessels"]
7508    pub mavtype: AisType,
7509    #[doc = "Distance from lat/lon location to port side"]
7510    pub dimension_port: u8,
7511    #[doc = "Distance from lat/lon location to starboard side"]
7512    pub dimension_starboard: u8,
7513    #[doc = "The vessel callsign"]
7514    #[cfg_attr(feature = "ts", ts(type = "string"))]
7515    pub callsign: CharArray<7>,
7516    #[doc = "The vessel name"]
7517    #[cfg_attr(feature = "ts", ts(type = "string"))]
7518    pub name: CharArray<20>,
7519}
7520impl AIS_VESSEL_DATA {
7521    pub const ENCODED_LEN: usize = 58usize;
7522    pub const DEFAULT: Self = Self {
7523        MMSI: 0_u32,
7524        lat: 0_i32,
7525        lon: 0_i32,
7526        COG: 0_u16,
7527        heading: 0_u16,
7528        velocity: 0_u16,
7529        dimension_bow: 0_u16,
7530        dimension_stern: 0_u16,
7531        tslc: 0_u16,
7532        flags: AisFlags::DEFAULT,
7533        turn_rate: 0_i8,
7534        navigational_status: AisNavStatus::DEFAULT,
7535        mavtype: AisType::DEFAULT,
7536        dimension_port: 0_u8,
7537        dimension_starboard: 0_u8,
7538        callsign: CharArray::new([0_u8; 7usize]),
7539        name: CharArray::new([0_u8; 20usize]),
7540    };
7541    #[cfg(feature = "arbitrary")]
7542    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7543        use arbitrary::{Arbitrary, Unstructured};
7544        let mut buf = [0u8; 1024];
7545        rng.fill_bytes(&mut buf);
7546        let mut unstructured = Unstructured::new(&buf);
7547        Self::arbitrary(&mut unstructured).unwrap_or_default()
7548    }
7549}
7550impl Default for AIS_VESSEL_DATA {
7551    fn default() -> Self {
7552        Self::DEFAULT.clone()
7553    }
7554}
7555impl MessageData for AIS_VESSEL_DATA {
7556    type Message = MavMessage;
7557    const ID: u32 = 301u32;
7558    const NAME: &'static str = "AIS_VESSEL";
7559    const EXTRA_CRC: u8 = 243u8;
7560    const ENCODED_LEN: usize = 58usize;
7561    fn deser(
7562        _version: MavlinkVersion,
7563        __input: &[u8],
7564    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7565        let avail_len = __input.len();
7566        let mut payload_buf = [0; Self::ENCODED_LEN];
7567        let mut buf = if avail_len < Self::ENCODED_LEN {
7568            payload_buf[0..avail_len].copy_from_slice(__input);
7569            Bytes::new(&payload_buf)
7570        } else {
7571            Bytes::new(__input)
7572        };
7573        let mut __struct = Self::default();
7574        __struct.MMSI = buf.get_u32_le()?;
7575        __struct.lat = buf.get_i32_le()?;
7576        __struct.lon = buf.get_i32_le()?;
7577        __struct.COG = buf.get_u16_le()?;
7578        __struct.heading = buf.get_u16_le()?;
7579        __struct.velocity = buf.get_u16_le()?;
7580        __struct.dimension_bow = buf.get_u16_le()?;
7581        __struct.dimension_stern = buf.get_u16_le()?;
7582        __struct.tslc = buf.get_u16_le()?;
7583        let tmp = buf.get_u16_le()?;
7584        __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
7585            ::mavlink_core::error::ParserError::InvalidFlag {
7586                flag_type: "AisFlags",
7587                value: tmp as u64,
7588            },
7589        )?;
7590        __struct.turn_rate = buf.get_i8()?;
7591        let tmp = buf.get_u8()?;
7592        __struct.navigational_status =
7593            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7594                enum_type: "AisNavStatus",
7595                value: tmp as u64,
7596            })?;
7597        let tmp = buf.get_u8()?;
7598        __struct.mavtype =
7599            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7600                enum_type: "AisType",
7601                value: tmp as u64,
7602            })?;
7603        __struct.dimension_port = buf.get_u8()?;
7604        __struct.dimension_starboard = buf.get_u8()?;
7605        let mut tmp = [0_u8; 7usize];
7606        for v in &mut tmp {
7607            *v = buf.get_u8()?;
7608        }
7609        __struct.callsign = CharArray::new(tmp);
7610        let mut tmp = [0_u8; 20usize];
7611        for v in &mut tmp {
7612            *v = buf.get_u8()?;
7613        }
7614        __struct.name = CharArray::new(tmp);
7615        Ok(__struct)
7616    }
7617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7618        let mut __tmp = BytesMut::new(bytes);
7619        #[allow(clippy::absurd_extreme_comparisons)]
7620        #[allow(unused_comparisons)]
7621        if __tmp.remaining() < Self::ENCODED_LEN {
7622            panic!(
7623                "buffer is too small (need {} bytes, but got {})",
7624                Self::ENCODED_LEN,
7625                __tmp.remaining(),
7626            )
7627        }
7628        __tmp.put_u32_le(self.MMSI);
7629        __tmp.put_i32_le(self.lat);
7630        __tmp.put_i32_le(self.lon);
7631        __tmp.put_u16_le(self.COG);
7632        __tmp.put_u16_le(self.heading);
7633        __tmp.put_u16_le(self.velocity);
7634        __tmp.put_u16_le(self.dimension_bow);
7635        __tmp.put_u16_le(self.dimension_stern);
7636        __tmp.put_u16_le(self.tslc);
7637        __tmp.put_u16_le(self.flags.bits() as u16);
7638        __tmp.put_i8(self.turn_rate);
7639        __tmp.put_u8(self.navigational_status as u8);
7640        __tmp.put_u8(self.mavtype as u8);
7641        __tmp.put_u8(self.dimension_port);
7642        __tmp.put_u8(self.dimension_starboard);
7643        for val in &self.callsign {
7644            __tmp.put_u8(*val);
7645        }
7646        for val in &self.name {
7647            __tmp.put_u8(*val);
7648        }
7649        if matches!(version, MavlinkVersion::V2) {
7650            let len = __tmp.len();
7651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7652        } else {
7653            __tmp.len()
7654        }
7655    }
7656}
7657#[doc = "The current system altitude."]
7658#[doc = ""]
7659#[doc = "ID: 141"]
7660#[derive(Debug, Clone, PartialEq)]
7661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7663#[cfg_attr(feature = "ts", derive(TS))]
7664#[cfg_attr(feature = "ts", ts(export))]
7665pub struct ALTITUDE_DATA {
7666    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7667    pub time_usec: u64,
7668    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
7669    pub altitude_monotonic: f32,
7670    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
7671    pub altitude_amsl: f32,
7672    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
7673    pub altitude_local: f32,
7674    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
7675    pub altitude_relative: f32,
7676    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
7677    pub altitude_terrain: f32,
7678    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
7679    pub bottom_clearance: f32,
7680}
7681impl ALTITUDE_DATA {
7682    pub const ENCODED_LEN: usize = 32usize;
7683    pub const DEFAULT: Self = Self {
7684        time_usec: 0_u64,
7685        altitude_monotonic: 0.0_f32,
7686        altitude_amsl: 0.0_f32,
7687        altitude_local: 0.0_f32,
7688        altitude_relative: 0.0_f32,
7689        altitude_terrain: 0.0_f32,
7690        bottom_clearance: 0.0_f32,
7691    };
7692    #[cfg(feature = "arbitrary")]
7693    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7694        use arbitrary::{Arbitrary, Unstructured};
7695        let mut buf = [0u8; 1024];
7696        rng.fill_bytes(&mut buf);
7697        let mut unstructured = Unstructured::new(&buf);
7698        Self::arbitrary(&mut unstructured).unwrap_or_default()
7699    }
7700}
7701impl Default for ALTITUDE_DATA {
7702    fn default() -> Self {
7703        Self::DEFAULT.clone()
7704    }
7705}
7706impl MessageData for ALTITUDE_DATA {
7707    type Message = MavMessage;
7708    const ID: u32 = 141u32;
7709    const NAME: &'static str = "ALTITUDE";
7710    const EXTRA_CRC: u8 = 47u8;
7711    const ENCODED_LEN: usize = 32usize;
7712    fn deser(
7713        _version: MavlinkVersion,
7714        __input: &[u8],
7715    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7716        let avail_len = __input.len();
7717        let mut payload_buf = [0; Self::ENCODED_LEN];
7718        let mut buf = if avail_len < Self::ENCODED_LEN {
7719            payload_buf[0..avail_len].copy_from_slice(__input);
7720            Bytes::new(&payload_buf)
7721        } else {
7722            Bytes::new(__input)
7723        };
7724        let mut __struct = Self::default();
7725        __struct.time_usec = buf.get_u64_le()?;
7726        __struct.altitude_monotonic = buf.get_f32_le()?;
7727        __struct.altitude_amsl = buf.get_f32_le()?;
7728        __struct.altitude_local = buf.get_f32_le()?;
7729        __struct.altitude_relative = buf.get_f32_le()?;
7730        __struct.altitude_terrain = buf.get_f32_le()?;
7731        __struct.bottom_clearance = buf.get_f32_le()?;
7732        Ok(__struct)
7733    }
7734    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7735        let mut __tmp = BytesMut::new(bytes);
7736        #[allow(clippy::absurd_extreme_comparisons)]
7737        #[allow(unused_comparisons)]
7738        if __tmp.remaining() < Self::ENCODED_LEN {
7739            panic!(
7740                "buffer is too small (need {} bytes, but got {})",
7741                Self::ENCODED_LEN,
7742                __tmp.remaining(),
7743            )
7744        }
7745        __tmp.put_u64_le(self.time_usec);
7746        __tmp.put_f32_le(self.altitude_monotonic);
7747        __tmp.put_f32_le(self.altitude_amsl);
7748        __tmp.put_f32_le(self.altitude_local);
7749        __tmp.put_f32_le(self.altitude_relative);
7750        __tmp.put_f32_le(self.altitude_terrain);
7751        __tmp.put_f32_le(self.bottom_clearance);
7752        if matches!(version, MavlinkVersion::V2) {
7753            let len = __tmp.len();
7754            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7755        } else {
7756            __tmp.len()
7757        }
7758    }
7759}
7760#[doc = "Angle of Attack and Side Slip Angle."]
7761#[doc = ""]
7762#[doc = "ID: 11020"]
7763#[derive(Debug, Clone, PartialEq)]
7764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7766#[cfg_attr(feature = "ts", derive(TS))]
7767#[cfg_attr(feature = "ts", ts(export))]
7768pub struct AOA_SSA_DATA {
7769    #[doc = "Timestamp (since boot or Unix epoch)."]
7770    pub time_usec: u64,
7771    #[doc = "Angle of Attack."]
7772    pub AOA: f32,
7773    #[doc = "Side Slip Angle."]
7774    pub SSA: f32,
7775}
7776impl AOA_SSA_DATA {
7777    pub const ENCODED_LEN: usize = 16usize;
7778    pub const DEFAULT: Self = Self {
7779        time_usec: 0_u64,
7780        AOA: 0.0_f32,
7781        SSA: 0.0_f32,
7782    };
7783    #[cfg(feature = "arbitrary")]
7784    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7785        use arbitrary::{Arbitrary, Unstructured};
7786        let mut buf = [0u8; 1024];
7787        rng.fill_bytes(&mut buf);
7788        let mut unstructured = Unstructured::new(&buf);
7789        Self::arbitrary(&mut unstructured).unwrap_or_default()
7790    }
7791}
7792impl Default for AOA_SSA_DATA {
7793    fn default() -> Self {
7794        Self::DEFAULT.clone()
7795    }
7796}
7797impl MessageData for AOA_SSA_DATA {
7798    type Message = MavMessage;
7799    const ID: u32 = 11020u32;
7800    const NAME: &'static str = "AOA_SSA";
7801    const EXTRA_CRC: u8 = 205u8;
7802    const ENCODED_LEN: usize = 16usize;
7803    fn deser(
7804        _version: MavlinkVersion,
7805        __input: &[u8],
7806    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7807        let avail_len = __input.len();
7808        let mut payload_buf = [0; Self::ENCODED_LEN];
7809        let mut buf = if avail_len < Self::ENCODED_LEN {
7810            payload_buf[0..avail_len].copy_from_slice(__input);
7811            Bytes::new(&payload_buf)
7812        } else {
7813            Bytes::new(__input)
7814        };
7815        let mut __struct = Self::default();
7816        __struct.time_usec = buf.get_u64_le()?;
7817        __struct.AOA = buf.get_f32_le()?;
7818        __struct.SSA = buf.get_f32_le()?;
7819        Ok(__struct)
7820    }
7821    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7822        let mut __tmp = BytesMut::new(bytes);
7823        #[allow(clippy::absurd_extreme_comparisons)]
7824        #[allow(unused_comparisons)]
7825        if __tmp.remaining() < Self::ENCODED_LEN {
7826            panic!(
7827                "buffer is too small (need {} bytes, but got {})",
7828                Self::ENCODED_LEN,
7829                __tmp.remaining(),
7830            )
7831        }
7832        __tmp.put_u64_le(self.time_usec);
7833        __tmp.put_f32_le(self.AOA);
7834        __tmp.put_f32_le(self.SSA);
7835        if matches!(version, MavlinkVersion::V2) {
7836            let len = __tmp.len();
7837            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7838        } else {
7839            __tmp.len()
7840        }
7841    }
7842}
7843#[doc = "Raw ADC output."]
7844#[doc = ""]
7845#[doc = "ID: 153"]
7846#[derive(Debug, Clone, PartialEq)]
7847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7849#[cfg_attr(feature = "ts", derive(TS))]
7850#[cfg_attr(feature = "ts", ts(export))]
7851pub struct AP_ADC_DATA {
7852    #[doc = "ADC output 1."]
7853    pub adc1: u16,
7854    #[doc = "ADC output 2."]
7855    pub adc2: u16,
7856    #[doc = "ADC output 3."]
7857    pub adc3: u16,
7858    #[doc = "ADC output 4."]
7859    pub adc4: u16,
7860    #[doc = "ADC output 5."]
7861    pub adc5: u16,
7862    #[doc = "ADC output 6."]
7863    pub adc6: u16,
7864}
7865impl AP_ADC_DATA {
7866    pub const ENCODED_LEN: usize = 12usize;
7867    pub const DEFAULT: Self = Self {
7868        adc1: 0_u16,
7869        adc2: 0_u16,
7870        adc3: 0_u16,
7871        adc4: 0_u16,
7872        adc5: 0_u16,
7873        adc6: 0_u16,
7874    };
7875    #[cfg(feature = "arbitrary")]
7876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7877        use arbitrary::{Arbitrary, Unstructured};
7878        let mut buf = [0u8; 1024];
7879        rng.fill_bytes(&mut buf);
7880        let mut unstructured = Unstructured::new(&buf);
7881        Self::arbitrary(&mut unstructured).unwrap_or_default()
7882    }
7883}
7884impl Default for AP_ADC_DATA {
7885    fn default() -> Self {
7886        Self::DEFAULT.clone()
7887    }
7888}
7889impl MessageData for AP_ADC_DATA {
7890    type Message = MavMessage;
7891    const ID: u32 = 153u32;
7892    const NAME: &'static str = "AP_ADC";
7893    const EXTRA_CRC: u8 = 188u8;
7894    const ENCODED_LEN: usize = 12usize;
7895    fn deser(
7896        _version: MavlinkVersion,
7897        __input: &[u8],
7898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7899        let avail_len = __input.len();
7900        let mut payload_buf = [0; Self::ENCODED_LEN];
7901        let mut buf = if avail_len < Self::ENCODED_LEN {
7902            payload_buf[0..avail_len].copy_from_slice(__input);
7903            Bytes::new(&payload_buf)
7904        } else {
7905            Bytes::new(__input)
7906        };
7907        let mut __struct = Self::default();
7908        __struct.adc1 = buf.get_u16_le()?;
7909        __struct.adc2 = buf.get_u16_le()?;
7910        __struct.adc3 = buf.get_u16_le()?;
7911        __struct.adc4 = buf.get_u16_le()?;
7912        __struct.adc5 = buf.get_u16_le()?;
7913        __struct.adc6 = buf.get_u16_le()?;
7914        Ok(__struct)
7915    }
7916    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7917        let mut __tmp = BytesMut::new(bytes);
7918        #[allow(clippy::absurd_extreme_comparisons)]
7919        #[allow(unused_comparisons)]
7920        if __tmp.remaining() < Self::ENCODED_LEN {
7921            panic!(
7922                "buffer is too small (need {} bytes, but got {})",
7923                Self::ENCODED_LEN,
7924                __tmp.remaining(),
7925            )
7926        }
7927        __tmp.put_u16_le(self.adc1);
7928        __tmp.put_u16_le(self.adc2);
7929        __tmp.put_u16_le(self.adc3);
7930        __tmp.put_u16_le(self.adc4);
7931        __tmp.put_u16_le(self.adc5);
7932        __tmp.put_u16_le(self.adc6);
7933        if matches!(version, MavlinkVersion::V2) {
7934            let len = __tmp.len();
7935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7936        } else {
7937            __tmp.len()
7938        }
7939    }
7940}
7941#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
7942#[doc = ""]
7943#[doc = "ID: 30"]
7944#[derive(Debug, Clone, PartialEq)]
7945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7947#[cfg_attr(feature = "ts", derive(TS))]
7948#[cfg_attr(feature = "ts", ts(export))]
7949pub struct ATTITUDE_DATA {
7950    #[doc = "Timestamp (time since system boot)."]
7951    pub time_boot_ms: u32,
7952    #[doc = "Roll angle (-pi..+pi)"]
7953    pub roll: f32,
7954    #[doc = "Pitch angle (-pi..+pi)"]
7955    pub pitch: f32,
7956    #[doc = "Yaw angle (-pi..+pi)"]
7957    pub yaw: f32,
7958    #[doc = "Roll angular speed"]
7959    pub rollspeed: f32,
7960    #[doc = "Pitch angular speed"]
7961    pub pitchspeed: f32,
7962    #[doc = "Yaw angular speed"]
7963    pub yawspeed: f32,
7964}
7965impl ATTITUDE_DATA {
7966    pub const ENCODED_LEN: usize = 28usize;
7967    pub const DEFAULT: Self = Self {
7968        time_boot_ms: 0_u32,
7969        roll: 0.0_f32,
7970        pitch: 0.0_f32,
7971        yaw: 0.0_f32,
7972        rollspeed: 0.0_f32,
7973        pitchspeed: 0.0_f32,
7974        yawspeed: 0.0_f32,
7975    };
7976    #[cfg(feature = "arbitrary")]
7977    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7978        use arbitrary::{Arbitrary, Unstructured};
7979        let mut buf = [0u8; 1024];
7980        rng.fill_bytes(&mut buf);
7981        let mut unstructured = Unstructured::new(&buf);
7982        Self::arbitrary(&mut unstructured).unwrap_or_default()
7983    }
7984}
7985impl Default for ATTITUDE_DATA {
7986    fn default() -> Self {
7987        Self::DEFAULT.clone()
7988    }
7989}
7990impl MessageData for ATTITUDE_DATA {
7991    type Message = MavMessage;
7992    const ID: u32 = 30u32;
7993    const NAME: &'static str = "ATTITUDE";
7994    const EXTRA_CRC: u8 = 39u8;
7995    const ENCODED_LEN: usize = 28usize;
7996    fn deser(
7997        _version: MavlinkVersion,
7998        __input: &[u8],
7999    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8000        let avail_len = __input.len();
8001        let mut payload_buf = [0; Self::ENCODED_LEN];
8002        let mut buf = if avail_len < Self::ENCODED_LEN {
8003            payload_buf[0..avail_len].copy_from_slice(__input);
8004            Bytes::new(&payload_buf)
8005        } else {
8006            Bytes::new(__input)
8007        };
8008        let mut __struct = Self::default();
8009        __struct.time_boot_ms = buf.get_u32_le()?;
8010        __struct.roll = buf.get_f32_le()?;
8011        __struct.pitch = buf.get_f32_le()?;
8012        __struct.yaw = buf.get_f32_le()?;
8013        __struct.rollspeed = buf.get_f32_le()?;
8014        __struct.pitchspeed = buf.get_f32_le()?;
8015        __struct.yawspeed = buf.get_f32_le()?;
8016        Ok(__struct)
8017    }
8018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8019        let mut __tmp = BytesMut::new(bytes);
8020        #[allow(clippy::absurd_extreme_comparisons)]
8021        #[allow(unused_comparisons)]
8022        if __tmp.remaining() < Self::ENCODED_LEN {
8023            panic!(
8024                "buffer is too small (need {} bytes, but got {})",
8025                Self::ENCODED_LEN,
8026                __tmp.remaining(),
8027            )
8028        }
8029        __tmp.put_u32_le(self.time_boot_ms);
8030        __tmp.put_f32_le(self.roll);
8031        __tmp.put_f32_le(self.pitch);
8032        __tmp.put_f32_le(self.yaw);
8033        __tmp.put_f32_le(self.rollspeed);
8034        __tmp.put_f32_le(self.pitchspeed);
8035        __tmp.put_f32_le(self.yawspeed);
8036        if matches!(version, MavlinkVersion::V2) {
8037            let len = __tmp.len();
8038            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8039        } else {
8040            __tmp.len()
8041        }
8042    }
8043}
8044#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
8045#[doc = ""]
8046#[doc = "ID: 31"]
8047#[derive(Debug, Clone, PartialEq)]
8048#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8049#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8050#[cfg_attr(feature = "ts", derive(TS))]
8051#[cfg_attr(feature = "ts", ts(export))]
8052pub struct ATTITUDE_QUATERNION_DATA {
8053    #[doc = "Timestamp (time since system boot)."]
8054    pub time_boot_ms: u32,
8055    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
8056    pub q1: f32,
8057    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
8058    pub q2: f32,
8059    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
8060    pub q3: f32,
8061    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
8062    pub q4: f32,
8063    #[doc = "Roll angular speed"]
8064    pub rollspeed: f32,
8065    #[doc = "Pitch angular speed"]
8066    pub pitchspeed: f32,
8067    #[doc = "Yaw angular speed"]
8068    pub yawspeed: f32,
8069    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
8070    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8071    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8072    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8073    pub repr_offset_q: [f32; 4],
8074}
8075impl ATTITUDE_QUATERNION_DATA {
8076    pub const ENCODED_LEN: usize = 48usize;
8077    pub const DEFAULT: Self = Self {
8078        time_boot_ms: 0_u32,
8079        q1: 0.0_f32,
8080        q2: 0.0_f32,
8081        q3: 0.0_f32,
8082        q4: 0.0_f32,
8083        rollspeed: 0.0_f32,
8084        pitchspeed: 0.0_f32,
8085        yawspeed: 0.0_f32,
8086        repr_offset_q: [0.0_f32; 4usize],
8087    };
8088    #[cfg(feature = "arbitrary")]
8089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8090        use arbitrary::{Arbitrary, Unstructured};
8091        let mut buf = [0u8; 1024];
8092        rng.fill_bytes(&mut buf);
8093        let mut unstructured = Unstructured::new(&buf);
8094        Self::arbitrary(&mut unstructured).unwrap_or_default()
8095    }
8096}
8097impl Default for ATTITUDE_QUATERNION_DATA {
8098    fn default() -> Self {
8099        Self::DEFAULT.clone()
8100    }
8101}
8102impl MessageData for ATTITUDE_QUATERNION_DATA {
8103    type Message = MavMessage;
8104    const ID: u32 = 31u32;
8105    const NAME: &'static str = "ATTITUDE_QUATERNION";
8106    const EXTRA_CRC: u8 = 246u8;
8107    const ENCODED_LEN: usize = 48usize;
8108    fn deser(
8109        _version: MavlinkVersion,
8110        __input: &[u8],
8111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8112        let avail_len = __input.len();
8113        let mut payload_buf = [0; Self::ENCODED_LEN];
8114        let mut buf = if avail_len < Self::ENCODED_LEN {
8115            payload_buf[0..avail_len].copy_from_slice(__input);
8116            Bytes::new(&payload_buf)
8117        } else {
8118            Bytes::new(__input)
8119        };
8120        let mut __struct = Self::default();
8121        __struct.time_boot_ms = buf.get_u32_le()?;
8122        __struct.q1 = buf.get_f32_le()?;
8123        __struct.q2 = buf.get_f32_le()?;
8124        __struct.q3 = buf.get_f32_le()?;
8125        __struct.q4 = buf.get_f32_le()?;
8126        __struct.rollspeed = buf.get_f32_le()?;
8127        __struct.pitchspeed = buf.get_f32_le()?;
8128        __struct.yawspeed = buf.get_f32_le()?;
8129        for v in &mut __struct.repr_offset_q {
8130            let val = buf.get_f32_le()?;
8131            *v = val;
8132        }
8133        Ok(__struct)
8134    }
8135    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8136        let mut __tmp = BytesMut::new(bytes);
8137        #[allow(clippy::absurd_extreme_comparisons)]
8138        #[allow(unused_comparisons)]
8139        if __tmp.remaining() < Self::ENCODED_LEN {
8140            panic!(
8141                "buffer is too small (need {} bytes, but got {})",
8142                Self::ENCODED_LEN,
8143                __tmp.remaining(),
8144            )
8145        }
8146        __tmp.put_u32_le(self.time_boot_ms);
8147        __tmp.put_f32_le(self.q1);
8148        __tmp.put_f32_le(self.q2);
8149        __tmp.put_f32_le(self.q3);
8150        __tmp.put_f32_le(self.q4);
8151        __tmp.put_f32_le(self.rollspeed);
8152        __tmp.put_f32_le(self.pitchspeed);
8153        __tmp.put_f32_le(self.yawspeed);
8154        if matches!(version, MavlinkVersion::V2) {
8155            for val in &self.repr_offset_q {
8156                __tmp.put_f32_le(*val);
8157            }
8158            let len = __tmp.len();
8159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8160        } else {
8161            __tmp.len()
8162        }
8163    }
8164}
8165#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
8166#[doc = ""]
8167#[doc = "ID: 61"]
8168#[derive(Debug, Clone, PartialEq)]
8169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8171#[cfg_attr(feature = "ts", derive(TS))]
8172#[cfg_attr(feature = "ts", ts(export))]
8173pub struct ATTITUDE_QUATERNION_COV_DATA {
8174    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8175    pub time_usec: u64,
8176    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
8177    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8178    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8179    pub q: [f32; 4],
8180    #[doc = "Roll angular speed"]
8181    pub rollspeed: f32,
8182    #[doc = "Pitch angular speed"]
8183    pub pitchspeed: f32,
8184    #[doc = "Yaw angular speed"]
8185    pub yawspeed: f32,
8186    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
8187    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8188    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8189    pub covariance: [f32; 9],
8190}
8191impl ATTITUDE_QUATERNION_COV_DATA {
8192    pub const ENCODED_LEN: usize = 72usize;
8193    pub const DEFAULT: Self = Self {
8194        time_usec: 0_u64,
8195        q: [0.0_f32; 4usize],
8196        rollspeed: 0.0_f32,
8197        pitchspeed: 0.0_f32,
8198        yawspeed: 0.0_f32,
8199        covariance: [0.0_f32; 9usize],
8200    };
8201    #[cfg(feature = "arbitrary")]
8202    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8203        use arbitrary::{Arbitrary, Unstructured};
8204        let mut buf = [0u8; 1024];
8205        rng.fill_bytes(&mut buf);
8206        let mut unstructured = Unstructured::new(&buf);
8207        Self::arbitrary(&mut unstructured).unwrap_or_default()
8208    }
8209}
8210impl Default for ATTITUDE_QUATERNION_COV_DATA {
8211    fn default() -> Self {
8212        Self::DEFAULT.clone()
8213    }
8214}
8215impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
8216    type Message = MavMessage;
8217    const ID: u32 = 61u32;
8218    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
8219    const EXTRA_CRC: u8 = 167u8;
8220    const ENCODED_LEN: usize = 72usize;
8221    fn deser(
8222        _version: MavlinkVersion,
8223        __input: &[u8],
8224    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8225        let avail_len = __input.len();
8226        let mut payload_buf = [0; Self::ENCODED_LEN];
8227        let mut buf = if avail_len < Self::ENCODED_LEN {
8228            payload_buf[0..avail_len].copy_from_slice(__input);
8229            Bytes::new(&payload_buf)
8230        } else {
8231            Bytes::new(__input)
8232        };
8233        let mut __struct = Self::default();
8234        __struct.time_usec = buf.get_u64_le()?;
8235        for v in &mut __struct.q {
8236            let val = buf.get_f32_le()?;
8237            *v = val;
8238        }
8239        __struct.rollspeed = buf.get_f32_le()?;
8240        __struct.pitchspeed = buf.get_f32_le()?;
8241        __struct.yawspeed = buf.get_f32_le()?;
8242        for v in &mut __struct.covariance {
8243            let val = buf.get_f32_le()?;
8244            *v = val;
8245        }
8246        Ok(__struct)
8247    }
8248    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8249        let mut __tmp = BytesMut::new(bytes);
8250        #[allow(clippy::absurd_extreme_comparisons)]
8251        #[allow(unused_comparisons)]
8252        if __tmp.remaining() < Self::ENCODED_LEN {
8253            panic!(
8254                "buffer is too small (need {} bytes, but got {})",
8255                Self::ENCODED_LEN,
8256                __tmp.remaining(),
8257            )
8258        }
8259        __tmp.put_u64_le(self.time_usec);
8260        for val in &self.q {
8261            __tmp.put_f32_le(*val);
8262        }
8263        __tmp.put_f32_le(self.rollspeed);
8264        __tmp.put_f32_le(self.pitchspeed);
8265        __tmp.put_f32_le(self.yawspeed);
8266        for val in &self.covariance {
8267            __tmp.put_f32_le(*val);
8268        }
8269        if matches!(version, MavlinkVersion::V2) {
8270            let len = __tmp.len();
8271            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8272        } else {
8273            __tmp.len()
8274        }
8275    }
8276}
8277#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
8278#[doc = ""]
8279#[doc = "ID: 83"]
8280#[derive(Debug, Clone, PartialEq)]
8281#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8282#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8283#[cfg_attr(feature = "ts", derive(TS))]
8284#[cfg_attr(feature = "ts", ts(export))]
8285pub struct ATTITUDE_TARGET_DATA {
8286    #[doc = "Timestamp (time since system boot)."]
8287    pub time_boot_ms: u32,
8288    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
8289    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8290    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8291    pub q: [f32; 4],
8292    #[doc = "Body roll rate"]
8293    pub body_roll_rate: f32,
8294    #[doc = "Body pitch rate"]
8295    pub body_pitch_rate: f32,
8296    #[doc = "Body yaw rate"]
8297    pub body_yaw_rate: f32,
8298    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
8299    pub thrust: f32,
8300    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
8301    pub type_mask: AttitudeTargetTypemask,
8302}
8303impl ATTITUDE_TARGET_DATA {
8304    pub const ENCODED_LEN: usize = 37usize;
8305    pub const DEFAULT: Self = Self {
8306        time_boot_ms: 0_u32,
8307        q: [0.0_f32; 4usize],
8308        body_roll_rate: 0.0_f32,
8309        body_pitch_rate: 0.0_f32,
8310        body_yaw_rate: 0.0_f32,
8311        thrust: 0.0_f32,
8312        type_mask: AttitudeTargetTypemask::DEFAULT,
8313    };
8314    #[cfg(feature = "arbitrary")]
8315    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8316        use arbitrary::{Arbitrary, Unstructured};
8317        let mut buf = [0u8; 1024];
8318        rng.fill_bytes(&mut buf);
8319        let mut unstructured = Unstructured::new(&buf);
8320        Self::arbitrary(&mut unstructured).unwrap_or_default()
8321    }
8322}
8323impl Default for ATTITUDE_TARGET_DATA {
8324    fn default() -> Self {
8325        Self::DEFAULT.clone()
8326    }
8327}
8328impl MessageData for ATTITUDE_TARGET_DATA {
8329    type Message = MavMessage;
8330    const ID: u32 = 83u32;
8331    const NAME: &'static str = "ATTITUDE_TARGET";
8332    const EXTRA_CRC: u8 = 22u8;
8333    const ENCODED_LEN: usize = 37usize;
8334    fn deser(
8335        _version: MavlinkVersion,
8336        __input: &[u8],
8337    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8338        let avail_len = __input.len();
8339        let mut payload_buf = [0; Self::ENCODED_LEN];
8340        let mut buf = if avail_len < Self::ENCODED_LEN {
8341            payload_buf[0..avail_len].copy_from_slice(__input);
8342            Bytes::new(&payload_buf)
8343        } else {
8344            Bytes::new(__input)
8345        };
8346        let mut __struct = Self::default();
8347        __struct.time_boot_ms = buf.get_u32_le()?;
8348        for v in &mut __struct.q {
8349            let val = buf.get_f32_le()?;
8350            *v = val;
8351        }
8352        __struct.body_roll_rate = buf.get_f32_le()?;
8353        __struct.body_pitch_rate = buf.get_f32_le()?;
8354        __struct.body_yaw_rate = buf.get_f32_le()?;
8355        __struct.thrust = buf.get_f32_le()?;
8356        let tmp = buf.get_u8()?;
8357        __struct.type_mask =
8358            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
8359                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8360                    flag_type: "AttitudeTargetTypemask",
8361                    value: tmp as u64,
8362                })?;
8363        Ok(__struct)
8364    }
8365    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8366        let mut __tmp = BytesMut::new(bytes);
8367        #[allow(clippy::absurd_extreme_comparisons)]
8368        #[allow(unused_comparisons)]
8369        if __tmp.remaining() < Self::ENCODED_LEN {
8370            panic!(
8371                "buffer is too small (need {} bytes, but got {})",
8372                Self::ENCODED_LEN,
8373                __tmp.remaining(),
8374            )
8375        }
8376        __tmp.put_u32_le(self.time_boot_ms);
8377        for val in &self.q {
8378            __tmp.put_f32_le(*val);
8379        }
8380        __tmp.put_f32_le(self.body_roll_rate);
8381        __tmp.put_f32_le(self.body_pitch_rate);
8382        __tmp.put_f32_le(self.body_yaw_rate);
8383        __tmp.put_f32_le(self.thrust);
8384        __tmp.put_u8(self.type_mask.bits() as u8);
8385        if matches!(version, MavlinkVersion::V2) {
8386            let len = __tmp.len();
8387            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8388        } else {
8389            __tmp.len()
8390        }
8391    }
8392}
8393#[doc = "Motion capture attitude and position."]
8394#[doc = ""]
8395#[doc = "ID: 138"]
8396#[derive(Debug, Clone, PartialEq)]
8397#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8398#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8399#[cfg_attr(feature = "ts", derive(TS))]
8400#[cfg_attr(feature = "ts", ts(export))]
8401pub struct ATT_POS_MOCAP_DATA {
8402    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8403    pub time_usec: u64,
8404    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
8405    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8406    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8407    pub q: [f32; 4],
8408    #[doc = "X position (NED)"]
8409    pub x: f32,
8410    #[doc = "Y position (NED)"]
8411    pub y: f32,
8412    #[doc = "Z position (NED)"]
8413    pub z: f32,
8414    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
8415    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8416    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8417    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8418    pub covariance: [f32; 21],
8419}
8420impl ATT_POS_MOCAP_DATA {
8421    pub const ENCODED_LEN: usize = 120usize;
8422    pub const DEFAULT: Self = Self {
8423        time_usec: 0_u64,
8424        q: [0.0_f32; 4usize],
8425        x: 0.0_f32,
8426        y: 0.0_f32,
8427        z: 0.0_f32,
8428        covariance: [0.0_f32; 21usize],
8429    };
8430    #[cfg(feature = "arbitrary")]
8431    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8432        use arbitrary::{Arbitrary, Unstructured};
8433        let mut buf = [0u8; 1024];
8434        rng.fill_bytes(&mut buf);
8435        let mut unstructured = Unstructured::new(&buf);
8436        Self::arbitrary(&mut unstructured).unwrap_or_default()
8437    }
8438}
8439impl Default for ATT_POS_MOCAP_DATA {
8440    fn default() -> Self {
8441        Self::DEFAULT.clone()
8442    }
8443}
8444impl MessageData for ATT_POS_MOCAP_DATA {
8445    type Message = MavMessage;
8446    const ID: u32 = 138u32;
8447    const NAME: &'static str = "ATT_POS_MOCAP";
8448    const EXTRA_CRC: u8 = 109u8;
8449    const ENCODED_LEN: usize = 120usize;
8450    fn deser(
8451        _version: MavlinkVersion,
8452        __input: &[u8],
8453    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8454        let avail_len = __input.len();
8455        let mut payload_buf = [0; Self::ENCODED_LEN];
8456        let mut buf = if avail_len < Self::ENCODED_LEN {
8457            payload_buf[0..avail_len].copy_from_slice(__input);
8458            Bytes::new(&payload_buf)
8459        } else {
8460            Bytes::new(__input)
8461        };
8462        let mut __struct = Self::default();
8463        __struct.time_usec = buf.get_u64_le()?;
8464        for v in &mut __struct.q {
8465            let val = buf.get_f32_le()?;
8466            *v = val;
8467        }
8468        __struct.x = buf.get_f32_le()?;
8469        __struct.y = buf.get_f32_le()?;
8470        __struct.z = buf.get_f32_le()?;
8471        for v in &mut __struct.covariance {
8472            let val = buf.get_f32_le()?;
8473            *v = val;
8474        }
8475        Ok(__struct)
8476    }
8477    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8478        let mut __tmp = BytesMut::new(bytes);
8479        #[allow(clippy::absurd_extreme_comparisons)]
8480        #[allow(unused_comparisons)]
8481        if __tmp.remaining() < Self::ENCODED_LEN {
8482            panic!(
8483                "buffer is too small (need {} bytes, but got {})",
8484                Self::ENCODED_LEN,
8485                __tmp.remaining(),
8486            )
8487        }
8488        __tmp.put_u64_le(self.time_usec);
8489        for val in &self.q {
8490            __tmp.put_f32_le(*val);
8491        }
8492        __tmp.put_f32_le(self.x);
8493        __tmp.put_f32_le(self.y);
8494        __tmp.put_f32_le(self.z);
8495        if matches!(version, MavlinkVersion::V2) {
8496            for val in &self.covariance {
8497                __tmp.put_f32_le(*val);
8498            }
8499            let len = __tmp.len();
8500            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8501        } else {
8502            __tmp.len()
8503        }
8504    }
8505}
8506#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
8507#[doc = ""]
8508#[doc = "ID: 7"]
8509#[derive(Debug, Clone, PartialEq)]
8510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8512#[cfg_attr(feature = "ts", derive(TS))]
8513#[cfg_attr(feature = "ts", ts(export))]
8514pub struct AUTH_KEY_DATA {
8515    #[doc = "key"]
8516    #[cfg_attr(feature = "ts", ts(type = "string"))]
8517    pub key: CharArray<32>,
8518}
8519impl AUTH_KEY_DATA {
8520    pub const ENCODED_LEN: usize = 32usize;
8521    pub const DEFAULT: Self = Self {
8522        key: CharArray::new([0_u8; 32usize]),
8523    };
8524    #[cfg(feature = "arbitrary")]
8525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8526        use arbitrary::{Arbitrary, Unstructured};
8527        let mut buf = [0u8; 1024];
8528        rng.fill_bytes(&mut buf);
8529        let mut unstructured = Unstructured::new(&buf);
8530        Self::arbitrary(&mut unstructured).unwrap_or_default()
8531    }
8532}
8533impl Default for AUTH_KEY_DATA {
8534    fn default() -> Self {
8535        Self::DEFAULT.clone()
8536    }
8537}
8538impl MessageData for AUTH_KEY_DATA {
8539    type Message = MavMessage;
8540    const ID: u32 = 7u32;
8541    const NAME: &'static str = "AUTH_KEY";
8542    const EXTRA_CRC: u8 = 119u8;
8543    const ENCODED_LEN: usize = 32usize;
8544    fn deser(
8545        _version: MavlinkVersion,
8546        __input: &[u8],
8547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8548        let avail_len = __input.len();
8549        let mut payload_buf = [0; Self::ENCODED_LEN];
8550        let mut buf = if avail_len < Self::ENCODED_LEN {
8551            payload_buf[0..avail_len].copy_from_slice(__input);
8552            Bytes::new(&payload_buf)
8553        } else {
8554            Bytes::new(__input)
8555        };
8556        let mut __struct = Self::default();
8557        let mut tmp = [0_u8; 32usize];
8558        for v in &mut tmp {
8559            *v = buf.get_u8()?;
8560        }
8561        __struct.key = CharArray::new(tmp);
8562        Ok(__struct)
8563    }
8564    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8565        let mut __tmp = BytesMut::new(bytes);
8566        #[allow(clippy::absurd_extreme_comparisons)]
8567        #[allow(unused_comparisons)]
8568        if __tmp.remaining() < Self::ENCODED_LEN {
8569            panic!(
8570                "buffer is too small (need {} bytes, but got {})",
8571                Self::ENCODED_LEN,
8572                __tmp.remaining(),
8573            )
8574        }
8575        for val in &self.key {
8576            __tmp.put_u8(*val);
8577        }
8578        if matches!(version, MavlinkVersion::V2) {
8579            let len = __tmp.len();
8580            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8581        } else {
8582            __tmp.len()
8583        }
8584    }
8585}
8586#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
8587#[doc = ""]
8588#[doc = "ID: 286"]
8589#[derive(Debug, Clone, PartialEq)]
8590#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8591#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8592#[cfg_attr(feature = "ts", derive(TS))]
8593#[cfg_attr(feature = "ts", ts(export))]
8594pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
8595    #[doc = "Timestamp (time since system boot)."]
8596    pub time_boot_us: u64,
8597    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
8598    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8599    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8600    pub q: [f32; 4],
8601    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
8602    pub q_estimated_delay_us: u32,
8603    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
8604    pub vx: f32,
8605    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
8606    pub vy: f32,
8607    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
8608    pub vz: f32,
8609    #[doc = "Estimated delay of the speed data. 0 if unknown."]
8610    pub v_estimated_delay_us: u32,
8611    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
8612    pub feed_forward_angular_velocity_z: f32,
8613    #[doc = "Bitmap indicating which estimator outputs are valid."]
8614    pub estimator_status: EstimatorStatusFlags,
8615    #[doc = "System ID"]
8616    pub target_system: u8,
8617    #[doc = "Component ID"]
8618    pub target_component: u8,
8619    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
8620    pub landed_state: MavLandedState,
8621    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
8622    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8623    pub angular_velocity_z: f32,
8624}
8625impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
8626    pub const ENCODED_LEN: usize = 57usize;
8627    pub const DEFAULT: Self = Self {
8628        time_boot_us: 0_u64,
8629        q: [0.0_f32; 4usize],
8630        q_estimated_delay_us: 0_u32,
8631        vx: 0.0_f32,
8632        vy: 0.0_f32,
8633        vz: 0.0_f32,
8634        v_estimated_delay_us: 0_u32,
8635        feed_forward_angular_velocity_z: 0.0_f32,
8636        estimator_status: EstimatorStatusFlags::DEFAULT,
8637        target_system: 0_u8,
8638        target_component: 0_u8,
8639        landed_state: MavLandedState::DEFAULT,
8640        angular_velocity_z: 0.0_f32,
8641    };
8642    #[cfg(feature = "arbitrary")]
8643    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8644        use arbitrary::{Arbitrary, Unstructured};
8645        let mut buf = [0u8; 1024];
8646        rng.fill_bytes(&mut buf);
8647        let mut unstructured = Unstructured::new(&buf);
8648        Self::arbitrary(&mut unstructured).unwrap_or_default()
8649    }
8650}
8651impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
8652    fn default() -> Self {
8653        Self::DEFAULT.clone()
8654    }
8655}
8656impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
8657    type Message = MavMessage;
8658    const ID: u32 = 286u32;
8659    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
8660    const EXTRA_CRC: u8 = 210u8;
8661    const ENCODED_LEN: usize = 57usize;
8662    fn deser(
8663        _version: MavlinkVersion,
8664        __input: &[u8],
8665    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8666        let avail_len = __input.len();
8667        let mut payload_buf = [0; Self::ENCODED_LEN];
8668        let mut buf = if avail_len < Self::ENCODED_LEN {
8669            payload_buf[0..avail_len].copy_from_slice(__input);
8670            Bytes::new(&payload_buf)
8671        } else {
8672            Bytes::new(__input)
8673        };
8674        let mut __struct = Self::default();
8675        __struct.time_boot_us = buf.get_u64_le()?;
8676        for v in &mut __struct.q {
8677            let val = buf.get_f32_le()?;
8678            *v = val;
8679        }
8680        __struct.q_estimated_delay_us = buf.get_u32_le()?;
8681        __struct.vx = buf.get_f32_le()?;
8682        __struct.vy = buf.get_f32_le()?;
8683        __struct.vz = buf.get_f32_le()?;
8684        __struct.v_estimated_delay_us = buf.get_u32_le()?;
8685        __struct.feed_forward_angular_velocity_z = buf.get_f32_le()?;
8686        let tmp = buf.get_u16_le()?;
8687        __struct.estimator_status = EstimatorStatusFlags::from_bits(
8688            tmp as <EstimatorStatusFlags as Flags>::Bits,
8689        )
8690        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8691            flag_type: "EstimatorStatusFlags",
8692            value: tmp as u64,
8693        })?;
8694        __struct.target_system = buf.get_u8()?;
8695        __struct.target_component = buf.get_u8()?;
8696        let tmp = buf.get_u8()?;
8697        __struct.landed_state =
8698            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8699                enum_type: "MavLandedState",
8700                value: tmp as u64,
8701            })?;
8702        __struct.angular_velocity_z = buf.get_f32_le()?;
8703        Ok(__struct)
8704    }
8705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8706        let mut __tmp = BytesMut::new(bytes);
8707        #[allow(clippy::absurd_extreme_comparisons)]
8708        #[allow(unused_comparisons)]
8709        if __tmp.remaining() < Self::ENCODED_LEN {
8710            panic!(
8711                "buffer is too small (need {} bytes, but got {})",
8712                Self::ENCODED_LEN,
8713                __tmp.remaining(),
8714            )
8715        }
8716        __tmp.put_u64_le(self.time_boot_us);
8717        for val in &self.q {
8718            __tmp.put_f32_le(*val);
8719        }
8720        __tmp.put_u32_le(self.q_estimated_delay_us);
8721        __tmp.put_f32_le(self.vx);
8722        __tmp.put_f32_le(self.vy);
8723        __tmp.put_f32_le(self.vz);
8724        __tmp.put_u32_le(self.v_estimated_delay_us);
8725        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
8726        __tmp.put_u16_le(self.estimator_status.bits() as u16);
8727        __tmp.put_u8(self.target_system);
8728        __tmp.put_u8(self.target_component);
8729        __tmp.put_u8(self.landed_state as u8);
8730        if matches!(version, MavlinkVersion::V2) {
8731            __tmp.put_f32_le(self.angular_velocity_z);
8732            let len = __tmp.len();
8733            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8734        } else {
8735            __tmp.len()
8736        }
8737    }
8738}
8739#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
8740#[doc = ""]
8741#[doc = "ID: 148"]
8742#[derive(Debug, Clone, PartialEq)]
8743#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8744#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8745#[cfg_attr(feature = "ts", derive(TS))]
8746#[cfg_attr(feature = "ts", ts(export))]
8747pub struct AUTOPILOT_VERSION_DATA {
8748    #[doc = "Bitmap of capabilities"]
8749    pub capabilities: MavProtocolCapability,
8750    #[doc = "UID if provided by hardware (see uid2)"]
8751    pub uid: u64,
8752    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
8753    pub flight_sw_version: u32,
8754    #[doc = "Middleware version number"]
8755    pub middleware_sw_version: u32,
8756    #[doc = "Operating system version number"]
8757    pub os_sw_version: u32,
8758    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
8759    pub board_version: u32,
8760    #[doc = "ID of the board vendor"]
8761    pub vendor_id: u16,
8762    #[doc = "ID of the product"]
8763    pub product_id: u16,
8764    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
8765    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8766    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8767    pub flight_custom_version: [u8; 8],
8768    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
8769    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8770    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8771    pub middleware_custom_version: [u8; 8],
8772    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
8773    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8774    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8775    pub os_custom_version: [u8; 8],
8776    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
8777    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8778    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8779    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8780    pub uid2: [u8; 18],
8781}
8782impl AUTOPILOT_VERSION_DATA {
8783    pub const ENCODED_LEN: usize = 78usize;
8784    pub const DEFAULT: Self = Self {
8785        capabilities: MavProtocolCapability::DEFAULT,
8786        uid: 0_u64,
8787        flight_sw_version: 0_u32,
8788        middleware_sw_version: 0_u32,
8789        os_sw_version: 0_u32,
8790        board_version: 0_u32,
8791        vendor_id: 0_u16,
8792        product_id: 0_u16,
8793        flight_custom_version: [0_u8; 8usize],
8794        middleware_custom_version: [0_u8; 8usize],
8795        os_custom_version: [0_u8; 8usize],
8796        uid2: [0_u8; 18usize],
8797    };
8798    #[cfg(feature = "arbitrary")]
8799    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8800        use arbitrary::{Arbitrary, Unstructured};
8801        let mut buf = [0u8; 1024];
8802        rng.fill_bytes(&mut buf);
8803        let mut unstructured = Unstructured::new(&buf);
8804        Self::arbitrary(&mut unstructured).unwrap_or_default()
8805    }
8806}
8807impl Default for AUTOPILOT_VERSION_DATA {
8808    fn default() -> Self {
8809        Self::DEFAULT.clone()
8810    }
8811}
8812impl MessageData for AUTOPILOT_VERSION_DATA {
8813    type Message = MavMessage;
8814    const ID: u32 = 148u32;
8815    const NAME: &'static str = "AUTOPILOT_VERSION";
8816    const EXTRA_CRC: u8 = 178u8;
8817    const ENCODED_LEN: usize = 78usize;
8818    fn deser(
8819        _version: MavlinkVersion,
8820        __input: &[u8],
8821    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8822        let avail_len = __input.len();
8823        let mut payload_buf = [0; Self::ENCODED_LEN];
8824        let mut buf = if avail_len < Self::ENCODED_LEN {
8825            payload_buf[0..avail_len].copy_from_slice(__input);
8826            Bytes::new(&payload_buf)
8827        } else {
8828            Bytes::new(__input)
8829        };
8830        let mut __struct = Self::default();
8831        let tmp = buf.get_u64_le()?;
8832        __struct.capabilities = MavProtocolCapability::from_bits(
8833            tmp as <MavProtocolCapability as Flags>::Bits,
8834        )
8835        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8836            flag_type: "MavProtocolCapability",
8837            value: tmp as u64,
8838        })?;
8839        __struct.uid = buf.get_u64_le()?;
8840        __struct.flight_sw_version = buf.get_u32_le()?;
8841        __struct.middleware_sw_version = buf.get_u32_le()?;
8842        __struct.os_sw_version = buf.get_u32_le()?;
8843        __struct.board_version = buf.get_u32_le()?;
8844        __struct.vendor_id = buf.get_u16_le()?;
8845        __struct.product_id = buf.get_u16_le()?;
8846        for v in &mut __struct.flight_custom_version {
8847            let val = buf.get_u8()?;
8848            *v = val;
8849        }
8850        for v in &mut __struct.middleware_custom_version {
8851            let val = buf.get_u8()?;
8852            *v = val;
8853        }
8854        for v in &mut __struct.os_custom_version {
8855            let val = buf.get_u8()?;
8856            *v = val;
8857        }
8858        for v in &mut __struct.uid2 {
8859            let val = buf.get_u8()?;
8860            *v = val;
8861        }
8862        Ok(__struct)
8863    }
8864    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8865        let mut __tmp = BytesMut::new(bytes);
8866        #[allow(clippy::absurd_extreme_comparisons)]
8867        #[allow(unused_comparisons)]
8868        if __tmp.remaining() < Self::ENCODED_LEN {
8869            panic!(
8870                "buffer is too small (need {} bytes, but got {})",
8871                Self::ENCODED_LEN,
8872                __tmp.remaining(),
8873            )
8874        }
8875        __tmp.put_u64_le(self.capabilities.bits() as u64);
8876        __tmp.put_u64_le(self.uid);
8877        __tmp.put_u32_le(self.flight_sw_version);
8878        __tmp.put_u32_le(self.middleware_sw_version);
8879        __tmp.put_u32_le(self.os_sw_version);
8880        __tmp.put_u32_le(self.board_version);
8881        __tmp.put_u16_le(self.vendor_id);
8882        __tmp.put_u16_le(self.product_id);
8883        for val in &self.flight_custom_version {
8884            __tmp.put_u8(*val);
8885        }
8886        for val in &self.middleware_custom_version {
8887            __tmp.put_u8(*val);
8888        }
8889        for val in &self.os_custom_version {
8890            __tmp.put_u8(*val);
8891        }
8892        if matches!(version, MavlinkVersion::V2) {
8893            for val in &self.uid2 {
8894                __tmp.put_u8(*val);
8895            }
8896            let len = __tmp.len();
8897            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8898        } else {
8899            __tmp.len()
8900        }
8901    }
8902}
8903#[doc = "Request the autopilot version from the system/component."]
8904#[doc = ""]
8905#[doc = "ID: 183"]
8906#[derive(Debug, Clone, PartialEq)]
8907#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8908#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8909#[cfg_attr(feature = "ts", derive(TS))]
8910#[cfg_attr(feature = "ts", ts(export))]
8911pub struct AUTOPILOT_VERSION_REQUEST_DATA {
8912    #[doc = "System ID."]
8913    pub target_system: u8,
8914    #[doc = "Component ID."]
8915    pub target_component: u8,
8916}
8917impl AUTOPILOT_VERSION_REQUEST_DATA {
8918    pub const ENCODED_LEN: usize = 2usize;
8919    pub const DEFAULT: Self = Self {
8920        target_system: 0_u8,
8921        target_component: 0_u8,
8922    };
8923    #[cfg(feature = "arbitrary")]
8924    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8925        use arbitrary::{Arbitrary, Unstructured};
8926        let mut buf = [0u8; 1024];
8927        rng.fill_bytes(&mut buf);
8928        let mut unstructured = Unstructured::new(&buf);
8929        Self::arbitrary(&mut unstructured).unwrap_or_default()
8930    }
8931}
8932impl Default for AUTOPILOT_VERSION_REQUEST_DATA {
8933    fn default() -> Self {
8934        Self::DEFAULT.clone()
8935    }
8936}
8937impl MessageData for AUTOPILOT_VERSION_REQUEST_DATA {
8938    type Message = MavMessage;
8939    const ID: u32 = 183u32;
8940    const NAME: &'static str = "AUTOPILOT_VERSION_REQUEST";
8941    const EXTRA_CRC: u8 = 85u8;
8942    const ENCODED_LEN: usize = 2usize;
8943    fn deser(
8944        _version: MavlinkVersion,
8945        __input: &[u8],
8946    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8947        let avail_len = __input.len();
8948        let mut payload_buf = [0; Self::ENCODED_LEN];
8949        let mut buf = if avail_len < Self::ENCODED_LEN {
8950            payload_buf[0..avail_len].copy_from_slice(__input);
8951            Bytes::new(&payload_buf)
8952        } else {
8953            Bytes::new(__input)
8954        };
8955        let mut __struct = Self::default();
8956        __struct.target_system = buf.get_u8()?;
8957        __struct.target_component = buf.get_u8()?;
8958        Ok(__struct)
8959    }
8960    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8961        let mut __tmp = BytesMut::new(bytes);
8962        #[allow(clippy::absurd_extreme_comparisons)]
8963        #[allow(unused_comparisons)]
8964        if __tmp.remaining() < Self::ENCODED_LEN {
8965            panic!(
8966                "buffer is too small (need {} bytes, but got {})",
8967                Self::ENCODED_LEN,
8968                __tmp.remaining(),
8969            )
8970        }
8971        __tmp.put_u8(self.target_system);
8972        __tmp.put_u8(self.target_component);
8973        if matches!(version, MavlinkVersion::V2) {
8974            let len = __tmp.len();
8975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8976        } else {
8977            __tmp.len()
8978        }
8979    }
8980}
8981#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
8982#[doc = ""]
8983#[doc = "ID: 435"]
8984#[derive(Debug, Clone, PartialEq)]
8985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8987#[cfg_attr(feature = "ts", derive(TS))]
8988#[cfg_attr(feature = "ts", ts(export))]
8989pub struct AVAILABLE_MODES_DATA {
8990    #[doc = "A bitfield for use for autopilot-specific flags"]
8991    pub custom_mode: u32,
8992    #[doc = "Mode properties."]
8993    pub properties: MavModeProperty,
8994    #[doc = "The total number of available modes for the current vehicle type."]
8995    pub number_modes: u8,
8996    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
8997    pub mode_index: u8,
8998    #[doc = "Standard mode."]
8999    pub standard_mode: MavStandardMode,
9000    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
9001    #[cfg_attr(feature = "ts", ts(type = "string"))]
9002    pub mode_name: CharArray<35>,
9003}
9004impl AVAILABLE_MODES_DATA {
9005    pub const ENCODED_LEN: usize = 46usize;
9006    pub const DEFAULT: Self = Self {
9007        custom_mode: 0_u32,
9008        properties: MavModeProperty::DEFAULT,
9009        number_modes: 0_u8,
9010        mode_index: 0_u8,
9011        standard_mode: MavStandardMode::DEFAULT,
9012        mode_name: CharArray::new([0_u8; 35usize]),
9013    };
9014    #[cfg(feature = "arbitrary")]
9015    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9016        use arbitrary::{Arbitrary, Unstructured};
9017        let mut buf = [0u8; 1024];
9018        rng.fill_bytes(&mut buf);
9019        let mut unstructured = Unstructured::new(&buf);
9020        Self::arbitrary(&mut unstructured).unwrap_or_default()
9021    }
9022}
9023impl Default for AVAILABLE_MODES_DATA {
9024    fn default() -> Self {
9025        Self::DEFAULT.clone()
9026    }
9027}
9028impl MessageData for AVAILABLE_MODES_DATA {
9029    type Message = MavMessage;
9030    const ID: u32 = 435u32;
9031    const NAME: &'static str = "AVAILABLE_MODES";
9032    const EXTRA_CRC: u8 = 134u8;
9033    const ENCODED_LEN: usize = 46usize;
9034    fn deser(
9035        _version: MavlinkVersion,
9036        __input: &[u8],
9037    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9038        let avail_len = __input.len();
9039        let mut payload_buf = [0; Self::ENCODED_LEN];
9040        let mut buf = if avail_len < Self::ENCODED_LEN {
9041            payload_buf[0..avail_len].copy_from_slice(__input);
9042            Bytes::new(&payload_buf)
9043        } else {
9044            Bytes::new(__input)
9045        };
9046        let mut __struct = Self::default();
9047        __struct.custom_mode = buf.get_u32_le()?;
9048        let tmp = buf.get_u32_le()?;
9049        __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
9050            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9051            flag_type: "MavModeProperty",
9052            value: tmp as u64,
9053        })?;
9054        __struct.number_modes = buf.get_u8()?;
9055        __struct.mode_index = buf.get_u8()?;
9056        let tmp = buf.get_u8()?;
9057        __struct.standard_mode =
9058            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9059                enum_type: "MavStandardMode",
9060                value: tmp as u64,
9061            })?;
9062        let mut tmp = [0_u8; 35usize];
9063        for v in &mut tmp {
9064            *v = buf.get_u8()?;
9065        }
9066        __struct.mode_name = CharArray::new(tmp);
9067        Ok(__struct)
9068    }
9069    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9070        let mut __tmp = BytesMut::new(bytes);
9071        #[allow(clippy::absurd_extreme_comparisons)]
9072        #[allow(unused_comparisons)]
9073        if __tmp.remaining() < Self::ENCODED_LEN {
9074            panic!(
9075                "buffer is too small (need {} bytes, but got {})",
9076                Self::ENCODED_LEN,
9077                __tmp.remaining(),
9078            )
9079        }
9080        __tmp.put_u32_le(self.custom_mode);
9081        __tmp.put_u32_le(self.properties.bits() as u32);
9082        __tmp.put_u8(self.number_modes);
9083        __tmp.put_u8(self.mode_index);
9084        __tmp.put_u8(self.standard_mode as u8);
9085        for val in &self.mode_name {
9086            __tmp.put_u8(*val);
9087        }
9088        if matches!(version, MavlinkVersion::V2) {
9089            let len = __tmp.len();
9090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9091        } else {
9092            __tmp.len()
9093        }
9094    }
9095}
9096#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
9097#[doc = ""]
9098#[doc = "ID: 437"]
9099#[derive(Debug, Clone, PartialEq)]
9100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9102#[cfg_attr(feature = "ts", derive(TS))]
9103#[cfg_attr(feature = "ts", ts(export))]
9104pub struct AVAILABLE_MODES_MONITOR_DATA {
9105    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
9106    pub seq: u8,
9107}
9108impl AVAILABLE_MODES_MONITOR_DATA {
9109    pub const ENCODED_LEN: usize = 1usize;
9110    pub const DEFAULT: Self = Self { seq: 0_u8 };
9111    #[cfg(feature = "arbitrary")]
9112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9113        use arbitrary::{Arbitrary, Unstructured};
9114        let mut buf = [0u8; 1024];
9115        rng.fill_bytes(&mut buf);
9116        let mut unstructured = Unstructured::new(&buf);
9117        Self::arbitrary(&mut unstructured).unwrap_or_default()
9118    }
9119}
9120impl Default for AVAILABLE_MODES_MONITOR_DATA {
9121    fn default() -> Self {
9122        Self::DEFAULT.clone()
9123    }
9124}
9125impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
9126    type Message = MavMessage;
9127    const ID: u32 = 437u32;
9128    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
9129    const EXTRA_CRC: u8 = 30u8;
9130    const ENCODED_LEN: usize = 1usize;
9131    fn deser(
9132        _version: MavlinkVersion,
9133        __input: &[u8],
9134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9135        let avail_len = __input.len();
9136        let mut payload_buf = [0; Self::ENCODED_LEN];
9137        let mut buf = if avail_len < Self::ENCODED_LEN {
9138            payload_buf[0..avail_len].copy_from_slice(__input);
9139            Bytes::new(&payload_buf)
9140        } else {
9141            Bytes::new(__input)
9142        };
9143        let mut __struct = Self::default();
9144        __struct.seq = buf.get_u8()?;
9145        Ok(__struct)
9146    }
9147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9148        let mut __tmp = BytesMut::new(bytes);
9149        #[allow(clippy::absurd_extreme_comparisons)]
9150        #[allow(unused_comparisons)]
9151        if __tmp.remaining() < Self::ENCODED_LEN {
9152            panic!(
9153                "buffer is too small (need {} bytes, but got {})",
9154                Self::ENCODED_LEN,
9155                __tmp.remaining(),
9156            )
9157        }
9158        __tmp.put_u8(self.seq);
9159        if matches!(version, MavlinkVersion::V2) {
9160            let len = __tmp.len();
9161            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9162        } else {
9163            __tmp.len()
9164        }
9165    }
9166}
9167#[deprecated = " See `BATTERY_STATUS` (Deprecated since 2017-04)"]
9168#[doc = "2nd Battery status."]
9169#[doc = ""]
9170#[doc = "ID: 181"]
9171#[derive(Debug, Clone, PartialEq)]
9172#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9173#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9174#[cfg_attr(feature = "ts", derive(TS))]
9175#[cfg_attr(feature = "ts", ts(export))]
9176pub struct BATTERY2_DATA {
9177    #[doc = "Voltage."]
9178    pub voltage: u16,
9179    #[doc = "Battery current, -1: autopilot does not measure the current."]
9180    pub current_battery: i16,
9181}
9182impl BATTERY2_DATA {
9183    pub const ENCODED_LEN: usize = 4usize;
9184    pub const DEFAULT: Self = Self {
9185        voltage: 0_u16,
9186        current_battery: 0_i16,
9187    };
9188    #[cfg(feature = "arbitrary")]
9189    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9190        use arbitrary::{Arbitrary, Unstructured};
9191        let mut buf = [0u8; 1024];
9192        rng.fill_bytes(&mut buf);
9193        let mut unstructured = Unstructured::new(&buf);
9194        Self::arbitrary(&mut unstructured).unwrap_or_default()
9195    }
9196}
9197impl Default for BATTERY2_DATA {
9198    fn default() -> Self {
9199        Self::DEFAULT.clone()
9200    }
9201}
9202impl MessageData for BATTERY2_DATA {
9203    type Message = MavMessage;
9204    const ID: u32 = 181u32;
9205    const NAME: &'static str = "BATTERY2";
9206    const EXTRA_CRC: u8 = 174u8;
9207    const ENCODED_LEN: usize = 4usize;
9208    fn deser(
9209        _version: MavlinkVersion,
9210        __input: &[u8],
9211    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9212        let avail_len = __input.len();
9213        let mut payload_buf = [0; Self::ENCODED_LEN];
9214        let mut buf = if avail_len < Self::ENCODED_LEN {
9215            payload_buf[0..avail_len].copy_from_slice(__input);
9216            Bytes::new(&payload_buf)
9217        } else {
9218            Bytes::new(__input)
9219        };
9220        let mut __struct = Self::default();
9221        __struct.voltage = buf.get_u16_le()?;
9222        __struct.current_battery = buf.get_i16_le()?;
9223        Ok(__struct)
9224    }
9225    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9226        let mut __tmp = BytesMut::new(bytes);
9227        #[allow(clippy::absurd_extreme_comparisons)]
9228        #[allow(unused_comparisons)]
9229        if __tmp.remaining() < Self::ENCODED_LEN {
9230            panic!(
9231                "buffer is too small (need {} bytes, but got {})",
9232                Self::ENCODED_LEN,
9233                __tmp.remaining(),
9234            )
9235        }
9236        __tmp.put_u16_le(self.voltage);
9237        __tmp.put_i16_le(self.current_battery);
9238        if matches!(version, MavlinkVersion::V2) {
9239            let len = __tmp.len();
9240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9241        } else {
9242            __tmp.len()
9243        }
9244    }
9245}
9246#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
9247#[doc = ""]
9248#[doc = "ID: 372"]
9249#[derive(Debug, Clone, PartialEq)]
9250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9252#[cfg_attr(feature = "ts", derive(TS))]
9253#[cfg_attr(feature = "ts", ts(export))]
9254pub struct BATTERY_INFO_DATA {
9255    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
9256    pub discharge_minimum_voltage: f32,
9257    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
9258    pub charging_minimum_voltage: f32,
9259    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
9260    pub resting_minimum_voltage: f32,
9261    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
9262    pub charging_maximum_voltage: f32,
9263    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
9264    pub charging_maximum_current: f32,
9265    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
9266    pub nominal_voltage: f32,
9267    #[doc = "Maximum pack discharge current. 0: field not provided."]
9268    pub discharge_maximum_current: f32,
9269    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
9270    pub discharge_maximum_burst_current: f32,
9271    #[doc = "Fully charged design capacity. 0: field not provided."]
9272    pub design_capacity: f32,
9273    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
9274    pub full_charge_capacity: f32,
9275    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
9276    pub cycle_count: u16,
9277    #[doc = "Battery weight. 0: field not provided."]
9278    pub weight: u16,
9279    #[doc = "Battery ID"]
9280    pub id: u8,
9281    #[doc = "Function of the battery."]
9282    pub battery_function: MavBatteryFunction,
9283    #[doc = "Type (chemistry) of the battery."]
9284    pub mavtype: MavBatteryType,
9285    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
9286    pub state_of_health: u8,
9287    #[doc = "Number of battery cells in series. 0: field not provided."]
9288    pub cells_in_series: u8,
9289    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
9290    #[cfg_attr(feature = "ts", ts(type = "string"))]
9291    pub manufacture_date: CharArray<9>,
9292    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
9293    #[cfg_attr(feature = "ts", ts(type = "string"))]
9294    pub serial_number: CharArray<32>,
9295    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
9296    #[cfg_attr(feature = "ts", ts(type = "string"))]
9297    pub name: CharArray<50>,
9298}
9299impl BATTERY_INFO_DATA {
9300    pub const ENCODED_LEN: usize = 140usize;
9301    pub const DEFAULT: Self = Self {
9302        discharge_minimum_voltage: 0.0_f32,
9303        charging_minimum_voltage: 0.0_f32,
9304        resting_minimum_voltage: 0.0_f32,
9305        charging_maximum_voltage: 0.0_f32,
9306        charging_maximum_current: 0.0_f32,
9307        nominal_voltage: 0.0_f32,
9308        discharge_maximum_current: 0.0_f32,
9309        discharge_maximum_burst_current: 0.0_f32,
9310        design_capacity: 0.0_f32,
9311        full_charge_capacity: 0.0_f32,
9312        cycle_count: 0_u16,
9313        weight: 0_u16,
9314        id: 0_u8,
9315        battery_function: MavBatteryFunction::DEFAULT,
9316        mavtype: MavBatteryType::DEFAULT,
9317        state_of_health: 0_u8,
9318        cells_in_series: 0_u8,
9319        manufacture_date: CharArray::new([0_u8; 9usize]),
9320        serial_number: CharArray::new([0_u8; 32usize]),
9321        name: CharArray::new([0_u8; 50usize]),
9322    };
9323    #[cfg(feature = "arbitrary")]
9324    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9325        use arbitrary::{Arbitrary, Unstructured};
9326        let mut buf = [0u8; 1024];
9327        rng.fill_bytes(&mut buf);
9328        let mut unstructured = Unstructured::new(&buf);
9329        Self::arbitrary(&mut unstructured).unwrap_or_default()
9330    }
9331}
9332impl Default for BATTERY_INFO_DATA {
9333    fn default() -> Self {
9334        Self::DEFAULT.clone()
9335    }
9336}
9337impl MessageData for BATTERY_INFO_DATA {
9338    type Message = MavMessage;
9339    const ID: u32 = 372u32;
9340    const NAME: &'static str = "BATTERY_INFO";
9341    const EXTRA_CRC: u8 = 26u8;
9342    const ENCODED_LEN: usize = 140usize;
9343    fn deser(
9344        _version: MavlinkVersion,
9345        __input: &[u8],
9346    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9347        let avail_len = __input.len();
9348        let mut payload_buf = [0; Self::ENCODED_LEN];
9349        let mut buf = if avail_len < Self::ENCODED_LEN {
9350            payload_buf[0..avail_len].copy_from_slice(__input);
9351            Bytes::new(&payload_buf)
9352        } else {
9353            Bytes::new(__input)
9354        };
9355        let mut __struct = Self::default();
9356        __struct.discharge_minimum_voltage = buf.get_f32_le()?;
9357        __struct.charging_minimum_voltage = buf.get_f32_le()?;
9358        __struct.resting_minimum_voltage = buf.get_f32_le()?;
9359        __struct.charging_maximum_voltage = buf.get_f32_le()?;
9360        __struct.charging_maximum_current = buf.get_f32_le()?;
9361        __struct.nominal_voltage = buf.get_f32_le()?;
9362        __struct.discharge_maximum_current = buf.get_f32_le()?;
9363        __struct.discharge_maximum_burst_current = buf.get_f32_le()?;
9364        __struct.design_capacity = buf.get_f32_le()?;
9365        __struct.full_charge_capacity = buf.get_f32_le()?;
9366        __struct.cycle_count = buf.get_u16_le()?;
9367        __struct.weight = buf.get_u16_le()?;
9368        __struct.id = buf.get_u8()?;
9369        let tmp = buf.get_u8()?;
9370        __struct.battery_function =
9371            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9372                enum_type: "MavBatteryFunction",
9373                value: tmp as u64,
9374            })?;
9375        let tmp = buf.get_u8()?;
9376        __struct.mavtype =
9377            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9378                enum_type: "MavBatteryType",
9379                value: tmp as u64,
9380            })?;
9381        __struct.state_of_health = buf.get_u8()?;
9382        __struct.cells_in_series = buf.get_u8()?;
9383        let mut tmp = [0_u8; 9usize];
9384        for v in &mut tmp {
9385            *v = buf.get_u8()?;
9386        }
9387        __struct.manufacture_date = CharArray::new(tmp);
9388        let mut tmp = [0_u8; 32usize];
9389        for v in &mut tmp {
9390            *v = buf.get_u8()?;
9391        }
9392        __struct.serial_number = CharArray::new(tmp);
9393        let mut tmp = [0_u8; 50usize];
9394        for v in &mut tmp {
9395            *v = buf.get_u8()?;
9396        }
9397        __struct.name = CharArray::new(tmp);
9398        Ok(__struct)
9399    }
9400    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9401        let mut __tmp = BytesMut::new(bytes);
9402        #[allow(clippy::absurd_extreme_comparisons)]
9403        #[allow(unused_comparisons)]
9404        if __tmp.remaining() < Self::ENCODED_LEN {
9405            panic!(
9406                "buffer is too small (need {} bytes, but got {})",
9407                Self::ENCODED_LEN,
9408                __tmp.remaining(),
9409            )
9410        }
9411        __tmp.put_f32_le(self.discharge_minimum_voltage);
9412        __tmp.put_f32_le(self.charging_minimum_voltage);
9413        __tmp.put_f32_le(self.resting_minimum_voltage);
9414        __tmp.put_f32_le(self.charging_maximum_voltage);
9415        __tmp.put_f32_le(self.charging_maximum_current);
9416        __tmp.put_f32_le(self.nominal_voltage);
9417        __tmp.put_f32_le(self.discharge_maximum_current);
9418        __tmp.put_f32_le(self.discharge_maximum_burst_current);
9419        __tmp.put_f32_le(self.design_capacity);
9420        __tmp.put_f32_le(self.full_charge_capacity);
9421        __tmp.put_u16_le(self.cycle_count);
9422        __tmp.put_u16_le(self.weight);
9423        __tmp.put_u8(self.id);
9424        __tmp.put_u8(self.battery_function as u8);
9425        __tmp.put_u8(self.mavtype as u8);
9426        __tmp.put_u8(self.state_of_health);
9427        __tmp.put_u8(self.cells_in_series);
9428        for val in &self.manufacture_date {
9429            __tmp.put_u8(*val);
9430        }
9431        for val in &self.serial_number {
9432            __tmp.put_u8(*val);
9433        }
9434        for val in &self.name {
9435            __tmp.put_u8(*val);
9436        }
9437        if matches!(version, MavlinkVersion::V2) {
9438            let len = __tmp.len();
9439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9440        } else {
9441            __tmp.len()
9442        }
9443    }
9444}
9445#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
9446#[doc = ""]
9447#[doc = "ID: 147"]
9448#[derive(Debug, Clone, PartialEq)]
9449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9451#[cfg_attr(feature = "ts", derive(TS))]
9452#[cfg_attr(feature = "ts", ts(export))]
9453pub struct BATTERY_STATUS_DATA {
9454    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
9455    pub current_consumed: i32,
9456    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
9457    pub energy_consumed: i32,
9458    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
9459    pub temperature: i16,
9460    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
9461    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9462    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9463    pub voltages: [u16; 10],
9464    #[doc = "Battery current, -1: autopilot does not measure the current"]
9465    pub current_battery: i16,
9466    #[doc = "Battery ID"]
9467    pub id: u8,
9468    #[doc = "Function of the battery"]
9469    pub battery_function: MavBatteryFunction,
9470    #[doc = "Type (chemistry) of the battery"]
9471    pub mavtype: MavBatteryType,
9472    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
9473    pub battery_remaining: i8,
9474    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
9475    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9476    pub time_remaining: i32,
9477    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
9478    #[cfg_attr(feature = "serde", serde(default))]
9479    pub charge_state: MavBatteryChargeState,
9480    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
9481    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9482    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9483    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9484    pub voltages_ext: [u16; 4],
9485    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
9486    #[cfg_attr(feature = "serde", serde(default))]
9487    pub mode: MavBatteryMode,
9488    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
9489    #[cfg_attr(feature = "serde", serde(default))]
9490    pub fault_bitmask: MavBatteryFault,
9491}
9492impl BATTERY_STATUS_DATA {
9493    pub const ENCODED_LEN: usize = 54usize;
9494    pub const DEFAULT: Self = Self {
9495        current_consumed: 0_i32,
9496        energy_consumed: 0_i32,
9497        temperature: 0_i16,
9498        voltages: [0_u16; 10usize],
9499        current_battery: 0_i16,
9500        id: 0_u8,
9501        battery_function: MavBatteryFunction::DEFAULT,
9502        mavtype: MavBatteryType::DEFAULT,
9503        battery_remaining: 0_i8,
9504        time_remaining: 0_i32,
9505        charge_state: MavBatteryChargeState::DEFAULT,
9506        voltages_ext: [0_u16; 4usize],
9507        mode: MavBatteryMode::DEFAULT,
9508        fault_bitmask: MavBatteryFault::DEFAULT,
9509    };
9510    #[cfg(feature = "arbitrary")]
9511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9512        use arbitrary::{Arbitrary, Unstructured};
9513        let mut buf = [0u8; 1024];
9514        rng.fill_bytes(&mut buf);
9515        let mut unstructured = Unstructured::new(&buf);
9516        Self::arbitrary(&mut unstructured).unwrap_or_default()
9517    }
9518}
9519impl Default for BATTERY_STATUS_DATA {
9520    fn default() -> Self {
9521        Self::DEFAULT.clone()
9522    }
9523}
9524impl MessageData for BATTERY_STATUS_DATA {
9525    type Message = MavMessage;
9526    const ID: u32 = 147u32;
9527    const NAME: &'static str = "BATTERY_STATUS";
9528    const EXTRA_CRC: u8 = 154u8;
9529    const ENCODED_LEN: usize = 54usize;
9530    fn deser(
9531        _version: MavlinkVersion,
9532        __input: &[u8],
9533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9534        let avail_len = __input.len();
9535        let mut payload_buf = [0; Self::ENCODED_LEN];
9536        let mut buf = if avail_len < Self::ENCODED_LEN {
9537            payload_buf[0..avail_len].copy_from_slice(__input);
9538            Bytes::new(&payload_buf)
9539        } else {
9540            Bytes::new(__input)
9541        };
9542        let mut __struct = Self::default();
9543        __struct.current_consumed = buf.get_i32_le()?;
9544        __struct.energy_consumed = buf.get_i32_le()?;
9545        __struct.temperature = buf.get_i16_le()?;
9546        for v in &mut __struct.voltages {
9547            let val = buf.get_u16_le()?;
9548            *v = val;
9549        }
9550        __struct.current_battery = buf.get_i16_le()?;
9551        __struct.id = buf.get_u8()?;
9552        let tmp = buf.get_u8()?;
9553        __struct.battery_function =
9554            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9555                enum_type: "MavBatteryFunction",
9556                value: tmp as u64,
9557            })?;
9558        let tmp = buf.get_u8()?;
9559        __struct.mavtype =
9560            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9561                enum_type: "MavBatteryType",
9562                value: tmp as u64,
9563            })?;
9564        __struct.battery_remaining = buf.get_i8()?;
9565        __struct.time_remaining = buf.get_i32_le()?;
9566        let tmp = buf.get_u8()?;
9567        __struct.charge_state =
9568            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9569                enum_type: "MavBatteryChargeState",
9570                value: tmp as u64,
9571            })?;
9572        for v in &mut __struct.voltages_ext {
9573            let val = buf.get_u16_le()?;
9574            *v = val;
9575        }
9576        let tmp = buf.get_u8()?;
9577        __struct.mode =
9578            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9579                enum_type: "MavBatteryMode",
9580                value: tmp as u64,
9581            })?;
9582        let tmp = buf.get_u32_le()?;
9583        __struct.fault_bitmask = MavBatteryFault::from_bits(
9584            tmp as <MavBatteryFault as Flags>::Bits,
9585        )
9586        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9587            flag_type: "MavBatteryFault",
9588            value: tmp as u64,
9589        })?;
9590        Ok(__struct)
9591    }
9592    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9593        let mut __tmp = BytesMut::new(bytes);
9594        #[allow(clippy::absurd_extreme_comparisons)]
9595        #[allow(unused_comparisons)]
9596        if __tmp.remaining() < Self::ENCODED_LEN {
9597            panic!(
9598                "buffer is too small (need {} bytes, but got {})",
9599                Self::ENCODED_LEN,
9600                __tmp.remaining(),
9601            )
9602        }
9603        __tmp.put_i32_le(self.current_consumed);
9604        __tmp.put_i32_le(self.energy_consumed);
9605        __tmp.put_i16_le(self.temperature);
9606        for val in &self.voltages {
9607            __tmp.put_u16_le(*val);
9608        }
9609        __tmp.put_i16_le(self.current_battery);
9610        __tmp.put_u8(self.id);
9611        __tmp.put_u8(self.battery_function as u8);
9612        __tmp.put_u8(self.mavtype as u8);
9613        __tmp.put_i8(self.battery_remaining);
9614        if matches!(version, MavlinkVersion::V2) {
9615            __tmp.put_i32_le(self.time_remaining);
9616            __tmp.put_u8(self.charge_state as u8);
9617            for val in &self.voltages_ext {
9618                __tmp.put_u16_le(*val);
9619            }
9620            __tmp.put_u8(self.mode as u8);
9621            __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
9622            let len = __tmp.len();
9623            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9624        } else {
9625            __tmp.len()
9626        }
9627    }
9628}
9629#[doc = "Report button state change."]
9630#[doc = ""]
9631#[doc = "ID: 257"]
9632#[derive(Debug, Clone, PartialEq)]
9633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9635#[cfg_attr(feature = "ts", derive(TS))]
9636#[cfg_attr(feature = "ts", ts(export))]
9637pub struct BUTTON_CHANGE_DATA {
9638    #[doc = "Timestamp (time since system boot)."]
9639    pub time_boot_ms: u32,
9640    #[doc = "Time of last change of button state."]
9641    pub last_change_ms: u32,
9642    #[doc = "Bitmap for state of buttons."]
9643    pub state: u8,
9644}
9645impl BUTTON_CHANGE_DATA {
9646    pub const ENCODED_LEN: usize = 9usize;
9647    pub const DEFAULT: Self = Self {
9648        time_boot_ms: 0_u32,
9649        last_change_ms: 0_u32,
9650        state: 0_u8,
9651    };
9652    #[cfg(feature = "arbitrary")]
9653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9654        use arbitrary::{Arbitrary, Unstructured};
9655        let mut buf = [0u8; 1024];
9656        rng.fill_bytes(&mut buf);
9657        let mut unstructured = Unstructured::new(&buf);
9658        Self::arbitrary(&mut unstructured).unwrap_or_default()
9659    }
9660}
9661impl Default for BUTTON_CHANGE_DATA {
9662    fn default() -> Self {
9663        Self::DEFAULT.clone()
9664    }
9665}
9666impl MessageData for BUTTON_CHANGE_DATA {
9667    type Message = MavMessage;
9668    const ID: u32 = 257u32;
9669    const NAME: &'static str = "BUTTON_CHANGE";
9670    const EXTRA_CRC: u8 = 131u8;
9671    const ENCODED_LEN: usize = 9usize;
9672    fn deser(
9673        _version: MavlinkVersion,
9674        __input: &[u8],
9675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9676        let avail_len = __input.len();
9677        let mut payload_buf = [0; Self::ENCODED_LEN];
9678        let mut buf = if avail_len < Self::ENCODED_LEN {
9679            payload_buf[0..avail_len].copy_from_slice(__input);
9680            Bytes::new(&payload_buf)
9681        } else {
9682            Bytes::new(__input)
9683        };
9684        let mut __struct = Self::default();
9685        __struct.time_boot_ms = buf.get_u32_le()?;
9686        __struct.last_change_ms = buf.get_u32_le()?;
9687        __struct.state = buf.get_u8()?;
9688        Ok(__struct)
9689    }
9690    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9691        let mut __tmp = BytesMut::new(bytes);
9692        #[allow(clippy::absurd_extreme_comparisons)]
9693        #[allow(unused_comparisons)]
9694        if __tmp.remaining() < Self::ENCODED_LEN {
9695            panic!(
9696                "buffer is too small (need {} bytes, but got {})",
9697                Self::ENCODED_LEN,
9698                __tmp.remaining(),
9699            )
9700        }
9701        __tmp.put_u32_le(self.time_boot_ms);
9702        __tmp.put_u32_le(self.last_change_ms);
9703        __tmp.put_u8(self.state);
9704        if matches!(version, MavlinkVersion::V2) {
9705            let len = __tmp.len();
9706            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9707        } else {
9708            __tmp.len()
9709        }
9710    }
9711}
9712#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
9713#[doc = ""]
9714#[doc = "ID: 262"]
9715#[derive(Debug, Clone, PartialEq)]
9716#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9717#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9718#[cfg_attr(feature = "ts", derive(TS))]
9719#[cfg_attr(feature = "ts", ts(export))]
9720pub struct CAMERA_CAPTURE_STATUS_DATA {
9721    #[doc = "Timestamp (time since system boot)."]
9722    pub time_boot_ms: u32,
9723    #[doc = "Image capture interval"]
9724    pub image_interval: f32,
9725    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
9726    pub recording_time_ms: u32,
9727    #[doc = "Available storage capacity."]
9728    pub available_capacity: f32,
9729    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
9730    pub image_status: u8,
9731    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
9732    pub video_status: u8,
9733    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
9734    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9735    pub image_count: i32,
9736    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
9737    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9738    pub camera_device_id: u8,
9739}
9740impl CAMERA_CAPTURE_STATUS_DATA {
9741    pub const ENCODED_LEN: usize = 23usize;
9742    pub const DEFAULT: Self = Self {
9743        time_boot_ms: 0_u32,
9744        image_interval: 0.0_f32,
9745        recording_time_ms: 0_u32,
9746        available_capacity: 0.0_f32,
9747        image_status: 0_u8,
9748        video_status: 0_u8,
9749        image_count: 0_i32,
9750        camera_device_id: 0_u8,
9751    };
9752    #[cfg(feature = "arbitrary")]
9753    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9754        use arbitrary::{Arbitrary, Unstructured};
9755        let mut buf = [0u8; 1024];
9756        rng.fill_bytes(&mut buf);
9757        let mut unstructured = Unstructured::new(&buf);
9758        Self::arbitrary(&mut unstructured).unwrap_or_default()
9759    }
9760}
9761impl Default for CAMERA_CAPTURE_STATUS_DATA {
9762    fn default() -> Self {
9763        Self::DEFAULT.clone()
9764    }
9765}
9766impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
9767    type Message = MavMessage;
9768    const ID: u32 = 262u32;
9769    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
9770    const EXTRA_CRC: u8 = 12u8;
9771    const ENCODED_LEN: usize = 23usize;
9772    fn deser(
9773        _version: MavlinkVersion,
9774        __input: &[u8],
9775    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9776        let avail_len = __input.len();
9777        let mut payload_buf = [0; Self::ENCODED_LEN];
9778        let mut buf = if avail_len < Self::ENCODED_LEN {
9779            payload_buf[0..avail_len].copy_from_slice(__input);
9780            Bytes::new(&payload_buf)
9781        } else {
9782            Bytes::new(__input)
9783        };
9784        let mut __struct = Self::default();
9785        __struct.time_boot_ms = buf.get_u32_le()?;
9786        __struct.image_interval = buf.get_f32_le()?;
9787        __struct.recording_time_ms = buf.get_u32_le()?;
9788        __struct.available_capacity = buf.get_f32_le()?;
9789        __struct.image_status = buf.get_u8()?;
9790        __struct.video_status = buf.get_u8()?;
9791        __struct.image_count = buf.get_i32_le()?;
9792        __struct.camera_device_id = buf.get_u8()?;
9793        Ok(__struct)
9794    }
9795    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9796        let mut __tmp = BytesMut::new(bytes);
9797        #[allow(clippy::absurd_extreme_comparisons)]
9798        #[allow(unused_comparisons)]
9799        if __tmp.remaining() < Self::ENCODED_LEN {
9800            panic!(
9801                "buffer is too small (need {} bytes, but got {})",
9802                Self::ENCODED_LEN,
9803                __tmp.remaining(),
9804            )
9805        }
9806        __tmp.put_u32_le(self.time_boot_ms);
9807        __tmp.put_f32_le(self.image_interval);
9808        __tmp.put_u32_le(self.recording_time_ms);
9809        __tmp.put_f32_le(self.available_capacity);
9810        __tmp.put_u8(self.image_status);
9811        __tmp.put_u8(self.video_status);
9812        if matches!(version, MavlinkVersion::V2) {
9813            __tmp.put_i32_le(self.image_count);
9814            __tmp.put_u8(self.camera_device_id);
9815            let len = __tmp.len();
9816            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9817        } else {
9818            __tmp.len()
9819        }
9820    }
9821}
9822#[doc = "Camera Capture Feedback."]
9823#[doc = ""]
9824#[doc = "ID: 180"]
9825#[derive(Debug, Clone, PartialEq)]
9826#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9828#[cfg_attr(feature = "ts", derive(TS))]
9829#[cfg_attr(feature = "ts", ts(export))]
9830pub struct CAMERA_FEEDBACK_DATA {
9831    #[doc = "Image timestamp (since UNIX epoch), as passed in by CAMERA_STATUS message (or autopilot if no CCB)."]
9832    pub time_usec: u64,
9833    #[doc = "Latitude."]
9834    pub lat: i32,
9835    #[doc = "Longitude."]
9836    pub lng: i32,
9837    #[doc = "Altitude (MSL)."]
9838    pub alt_msl: f32,
9839    #[doc = "Altitude (Relative to HOME location)."]
9840    pub alt_rel: f32,
9841    #[doc = "Camera Roll angle (earth frame, +-180)."]
9842    pub roll: f32,
9843    #[doc = "Camera Pitch angle (earth frame, +-180)."]
9844    pub pitch: f32,
9845    #[doc = "Camera Yaw (earth frame, 0-360, true)."]
9846    pub yaw: f32,
9847    #[doc = "Focal Length."]
9848    pub foc_len: f32,
9849    #[doc = "Image index."]
9850    pub img_idx: u16,
9851    #[doc = "System ID."]
9852    pub target_system: u8,
9853    #[doc = "Camera ID."]
9854    pub cam_idx: u8,
9855    #[doc = "Feedback flags."]
9856    pub flags: CameraFeedbackFlags,
9857    #[doc = "Completed image captures."]
9858    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9859    pub completed_captures: u16,
9860}
9861impl CAMERA_FEEDBACK_DATA {
9862    pub const ENCODED_LEN: usize = 47usize;
9863    pub const DEFAULT: Self = Self {
9864        time_usec: 0_u64,
9865        lat: 0_i32,
9866        lng: 0_i32,
9867        alt_msl: 0.0_f32,
9868        alt_rel: 0.0_f32,
9869        roll: 0.0_f32,
9870        pitch: 0.0_f32,
9871        yaw: 0.0_f32,
9872        foc_len: 0.0_f32,
9873        img_idx: 0_u16,
9874        target_system: 0_u8,
9875        cam_idx: 0_u8,
9876        flags: CameraFeedbackFlags::DEFAULT,
9877        completed_captures: 0_u16,
9878    };
9879    #[cfg(feature = "arbitrary")]
9880    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9881        use arbitrary::{Arbitrary, Unstructured};
9882        let mut buf = [0u8; 1024];
9883        rng.fill_bytes(&mut buf);
9884        let mut unstructured = Unstructured::new(&buf);
9885        Self::arbitrary(&mut unstructured).unwrap_or_default()
9886    }
9887}
9888impl Default for CAMERA_FEEDBACK_DATA {
9889    fn default() -> Self {
9890        Self::DEFAULT.clone()
9891    }
9892}
9893impl MessageData for CAMERA_FEEDBACK_DATA {
9894    type Message = MavMessage;
9895    const ID: u32 = 180u32;
9896    const NAME: &'static str = "CAMERA_FEEDBACK";
9897    const EXTRA_CRC: u8 = 52u8;
9898    const ENCODED_LEN: usize = 47usize;
9899    fn deser(
9900        _version: MavlinkVersion,
9901        __input: &[u8],
9902    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9903        let avail_len = __input.len();
9904        let mut payload_buf = [0; Self::ENCODED_LEN];
9905        let mut buf = if avail_len < Self::ENCODED_LEN {
9906            payload_buf[0..avail_len].copy_from_slice(__input);
9907            Bytes::new(&payload_buf)
9908        } else {
9909            Bytes::new(__input)
9910        };
9911        let mut __struct = Self::default();
9912        __struct.time_usec = buf.get_u64_le()?;
9913        __struct.lat = buf.get_i32_le()?;
9914        __struct.lng = buf.get_i32_le()?;
9915        __struct.alt_msl = buf.get_f32_le()?;
9916        __struct.alt_rel = buf.get_f32_le()?;
9917        __struct.roll = buf.get_f32_le()?;
9918        __struct.pitch = buf.get_f32_le()?;
9919        __struct.yaw = buf.get_f32_le()?;
9920        __struct.foc_len = buf.get_f32_le()?;
9921        __struct.img_idx = buf.get_u16_le()?;
9922        __struct.target_system = buf.get_u8()?;
9923        __struct.cam_idx = buf.get_u8()?;
9924        let tmp = buf.get_u8()?;
9925        __struct.flags =
9926            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9927                enum_type: "CameraFeedbackFlags",
9928                value: tmp as u64,
9929            })?;
9930        __struct.completed_captures = buf.get_u16_le()?;
9931        Ok(__struct)
9932    }
9933    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9934        let mut __tmp = BytesMut::new(bytes);
9935        #[allow(clippy::absurd_extreme_comparisons)]
9936        #[allow(unused_comparisons)]
9937        if __tmp.remaining() < Self::ENCODED_LEN {
9938            panic!(
9939                "buffer is too small (need {} bytes, but got {})",
9940                Self::ENCODED_LEN,
9941                __tmp.remaining(),
9942            )
9943        }
9944        __tmp.put_u64_le(self.time_usec);
9945        __tmp.put_i32_le(self.lat);
9946        __tmp.put_i32_le(self.lng);
9947        __tmp.put_f32_le(self.alt_msl);
9948        __tmp.put_f32_le(self.alt_rel);
9949        __tmp.put_f32_le(self.roll);
9950        __tmp.put_f32_le(self.pitch);
9951        __tmp.put_f32_le(self.yaw);
9952        __tmp.put_f32_le(self.foc_len);
9953        __tmp.put_u16_le(self.img_idx);
9954        __tmp.put_u8(self.target_system);
9955        __tmp.put_u8(self.cam_idx);
9956        __tmp.put_u8(self.flags as u8);
9957        if matches!(version, MavlinkVersion::V2) {
9958            __tmp.put_u16_le(self.completed_captures);
9959            let len = __tmp.len();
9960            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9961        } else {
9962            __tmp.len()
9963        }
9964    }
9965}
9966#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
9967#[doc = ""]
9968#[doc = "ID: 271"]
9969#[derive(Debug, Clone, PartialEq)]
9970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9972#[cfg_attr(feature = "ts", derive(TS))]
9973#[cfg_attr(feature = "ts", ts(export))]
9974pub struct CAMERA_FOV_STATUS_DATA {
9975    #[doc = "Timestamp (time since system boot)."]
9976    pub time_boot_ms: u32,
9977    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
9978    pub lat_camera: i32,
9979    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
9980    pub lon_camera: i32,
9981    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
9982    pub alt_camera: i32,
9983    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
9984    pub lat_image: i32,
9985    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
9986    pub lon_image: i32,
9987    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
9988    pub alt_image: i32,
9989    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
9990    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9991    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9992    pub q: [f32; 4],
9993    #[doc = "Horizontal field of view (NaN if unknown)."]
9994    pub hfov: f32,
9995    #[doc = "Vertical field of view (NaN if unknown)."]
9996    pub vfov: f32,
9997    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
9998    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9999    pub camera_device_id: u8,
10000}
10001impl CAMERA_FOV_STATUS_DATA {
10002    pub const ENCODED_LEN: usize = 53usize;
10003    pub const DEFAULT: Self = Self {
10004        time_boot_ms: 0_u32,
10005        lat_camera: 0_i32,
10006        lon_camera: 0_i32,
10007        alt_camera: 0_i32,
10008        lat_image: 0_i32,
10009        lon_image: 0_i32,
10010        alt_image: 0_i32,
10011        q: [0.0_f32; 4usize],
10012        hfov: 0.0_f32,
10013        vfov: 0.0_f32,
10014        camera_device_id: 0_u8,
10015    };
10016    #[cfg(feature = "arbitrary")]
10017    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10018        use arbitrary::{Arbitrary, Unstructured};
10019        let mut buf = [0u8; 1024];
10020        rng.fill_bytes(&mut buf);
10021        let mut unstructured = Unstructured::new(&buf);
10022        Self::arbitrary(&mut unstructured).unwrap_or_default()
10023    }
10024}
10025impl Default for CAMERA_FOV_STATUS_DATA {
10026    fn default() -> Self {
10027        Self::DEFAULT.clone()
10028    }
10029}
10030impl MessageData for CAMERA_FOV_STATUS_DATA {
10031    type Message = MavMessage;
10032    const ID: u32 = 271u32;
10033    const NAME: &'static str = "CAMERA_FOV_STATUS";
10034    const EXTRA_CRC: u8 = 22u8;
10035    const ENCODED_LEN: usize = 53usize;
10036    fn deser(
10037        _version: MavlinkVersion,
10038        __input: &[u8],
10039    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10040        let avail_len = __input.len();
10041        let mut payload_buf = [0; Self::ENCODED_LEN];
10042        let mut buf = if avail_len < Self::ENCODED_LEN {
10043            payload_buf[0..avail_len].copy_from_slice(__input);
10044            Bytes::new(&payload_buf)
10045        } else {
10046            Bytes::new(__input)
10047        };
10048        let mut __struct = Self::default();
10049        __struct.time_boot_ms = buf.get_u32_le()?;
10050        __struct.lat_camera = buf.get_i32_le()?;
10051        __struct.lon_camera = buf.get_i32_le()?;
10052        __struct.alt_camera = buf.get_i32_le()?;
10053        __struct.lat_image = buf.get_i32_le()?;
10054        __struct.lon_image = buf.get_i32_le()?;
10055        __struct.alt_image = buf.get_i32_le()?;
10056        for v in &mut __struct.q {
10057            let val = buf.get_f32_le()?;
10058            *v = val;
10059        }
10060        __struct.hfov = buf.get_f32_le()?;
10061        __struct.vfov = buf.get_f32_le()?;
10062        __struct.camera_device_id = buf.get_u8()?;
10063        Ok(__struct)
10064    }
10065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10066        let mut __tmp = BytesMut::new(bytes);
10067        #[allow(clippy::absurd_extreme_comparisons)]
10068        #[allow(unused_comparisons)]
10069        if __tmp.remaining() < Self::ENCODED_LEN {
10070            panic!(
10071                "buffer is too small (need {} bytes, but got {})",
10072                Self::ENCODED_LEN,
10073                __tmp.remaining(),
10074            )
10075        }
10076        __tmp.put_u32_le(self.time_boot_ms);
10077        __tmp.put_i32_le(self.lat_camera);
10078        __tmp.put_i32_le(self.lon_camera);
10079        __tmp.put_i32_le(self.alt_camera);
10080        __tmp.put_i32_le(self.lat_image);
10081        __tmp.put_i32_le(self.lon_image);
10082        __tmp.put_i32_le(self.alt_image);
10083        for val in &self.q {
10084            __tmp.put_f32_le(*val);
10085        }
10086        __tmp.put_f32_le(self.hfov);
10087        __tmp.put_f32_le(self.vfov);
10088        if matches!(version, MavlinkVersion::V2) {
10089            __tmp.put_u8(self.camera_device_id);
10090            let len = __tmp.len();
10091            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10092        } else {
10093            __tmp.len()
10094        }
10095    }
10096}
10097#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
10098#[doc = ""]
10099#[doc = "ID: 263"]
10100#[derive(Debug, Clone, PartialEq)]
10101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10103#[cfg_attr(feature = "ts", derive(TS))]
10104#[cfg_attr(feature = "ts", ts(export))]
10105pub struct CAMERA_IMAGE_CAPTURED_DATA {
10106    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
10107    pub time_utc: u64,
10108    #[doc = "Timestamp (time since system boot)."]
10109    pub time_boot_ms: u32,
10110    #[doc = "Latitude where image was taken"]
10111    pub lat: i32,
10112    #[doc = "Longitude where capture was taken"]
10113    pub lon: i32,
10114    #[doc = "Altitude (MSL) where image was taken"]
10115    pub alt: i32,
10116    #[doc = "Altitude above ground"]
10117    pub relative_alt: i32,
10118    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
10119    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10120    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10121    pub q: [f32; 4],
10122    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
10123    pub image_index: i32,
10124    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
10125    pub camera_id: u8,
10126    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
10127    pub capture_result: i8,
10128    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
10129    #[cfg_attr(feature = "ts", ts(type = "string"))]
10130    pub file_url: CharArray<205>,
10131}
10132impl CAMERA_IMAGE_CAPTURED_DATA {
10133    pub const ENCODED_LEN: usize = 255usize;
10134    pub const DEFAULT: Self = Self {
10135        time_utc: 0_u64,
10136        time_boot_ms: 0_u32,
10137        lat: 0_i32,
10138        lon: 0_i32,
10139        alt: 0_i32,
10140        relative_alt: 0_i32,
10141        q: [0.0_f32; 4usize],
10142        image_index: 0_i32,
10143        camera_id: 0_u8,
10144        capture_result: 0_i8,
10145        file_url: CharArray::new([0_u8; 205usize]),
10146    };
10147    #[cfg(feature = "arbitrary")]
10148    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10149        use arbitrary::{Arbitrary, Unstructured};
10150        let mut buf = [0u8; 1024];
10151        rng.fill_bytes(&mut buf);
10152        let mut unstructured = Unstructured::new(&buf);
10153        Self::arbitrary(&mut unstructured).unwrap_or_default()
10154    }
10155}
10156impl Default for CAMERA_IMAGE_CAPTURED_DATA {
10157    fn default() -> Self {
10158        Self::DEFAULT.clone()
10159    }
10160}
10161impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
10162    type Message = MavMessage;
10163    const ID: u32 = 263u32;
10164    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
10165    const EXTRA_CRC: u8 = 133u8;
10166    const ENCODED_LEN: usize = 255usize;
10167    fn deser(
10168        _version: MavlinkVersion,
10169        __input: &[u8],
10170    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10171        let avail_len = __input.len();
10172        let mut payload_buf = [0; Self::ENCODED_LEN];
10173        let mut buf = if avail_len < Self::ENCODED_LEN {
10174            payload_buf[0..avail_len].copy_from_slice(__input);
10175            Bytes::new(&payload_buf)
10176        } else {
10177            Bytes::new(__input)
10178        };
10179        let mut __struct = Self::default();
10180        __struct.time_utc = buf.get_u64_le()?;
10181        __struct.time_boot_ms = buf.get_u32_le()?;
10182        __struct.lat = buf.get_i32_le()?;
10183        __struct.lon = buf.get_i32_le()?;
10184        __struct.alt = buf.get_i32_le()?;
10185        __struct.relative_alt = buf.get_i32_le()?;
10186        for v in &mut __struct.q {
10187            let val = buf.get_f32_le()?;
10188            *v = val;
10189        }
10190        __struct.image_index = buf.get_i32_le()?;
10191        __struct.camera_id = buf.get_u8()?;
10192        __struct.capture_result = buf.get_i8()?;
10193        let mut tmp = [0_u8; 205usize];
10194        for v in &mut tmp {
10195            *v = buf.get_u8()?;
10196        }
10197        __struct.file_url = CharArray::new(tmp);
10198        Ok(__struct)
10199    }
10200    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10201        let mut __tmp = BytesMut::new(bytes);
10202        #[allow(clippy::absurd_extreme_comparisons)]
10203        #[allow(unused_comparisons)]
10204        if __tmp.remaining() < Self::ENCODED_LEN {
10205            panic!(
10206                "buffer is too small (need {} bytes, but got {})",
10207                Self::ENCODED_LEN,
10208                __tmp.remaining(),
10209            )
10210        }
10211        __tmp.put_u64_le(self.time_utc);
10212        __tmp.put_u32_le(self.time_boot_ms);
10213        __tmp.put_i32_le(self.lat);
10214        __tmp.put_i32_le(self.lon);
10215        __tmp.put_i32_le(self.alt);
10216        __tmp.put_i32_le(self.relative_alt);
10217        for val in &self.q {
10218            __tmp.put_f32_le(*val);
10219        }
10220        __tmp.put_i32_le(self.image_index);
10221        __tmp.put_u8(self.camera_id);
10222        __tmp.put_i8(self.capture_result);
10223        for val in &self.file_url {
10224            __tmp.put_u8(*val);
10225        }
10226        if matches!(version, MavlinkVersion::V2) {
10227            let len = __tmp.len();
10228            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10229        } else {
10230            __tmp.len()
10231        }
10232    }
10233}
10234#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
10235#[doc = ""]
10236#[doc = "ID: 259"]
10237#[derive(Debug, Clone, PartialEq)]
10238#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10239#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10240#[cfg_attr(feature = "ts", derive(TS))]
10241#[cfg_attr(feature = "ts", ts(export))]
10242pub struct CAMERA_INFORMATION_DATA {
10243    #[doc = "Timestamp (time since system boot)."]
10244    pub time_boot_ms: u32,
10245    #[doc = "0xff). Use 0 if not known."]
10246    pub firmware_version: u32,
10247    #[doc = "Focal length. Use NaN if not known."]
10248    pub focal_length: f32,
10249    #[doc = "Image sensor size horizontal. Use NaN if not known."]
10250    pub sensor_size_h: f32,
10251    #[doc = "Image sensor size vertical. Use NaN if not known."]
10252    pub sensor_size_v: f32,
10253    #[doc = "Bitmap of camera capability flags."]
10254    pub flags: CameraCapFlags,
10255    #[doc = "Horizontal image resolution. Use 0 if not known."]
10256    pub resolution_h: u16,
10257    #[doc = "Vertical image resolution. Use 0 if not known."]
10258    pub resolution_v: u16,
10259    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
10260    pub cam_definition_version: u16,
10261    #[doc = "Name of the camera vendor"]
10262    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10263    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10264    pub vendor_name: [u8; 32],
10265    #[doc = "Name of the camera model"]
10266    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10267    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10268    pub model_name: [u8; 32],
10269    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
10270    pub lens_id: u8,
10271    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
10272    #[cfg_attr(feature = "ts", ts(type = "string"))]
10273    pub cam_definition_uri: CharArray<140>,
10274    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
10275    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10276    pub gimbal_device_id: u8,
10277    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
10278    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10279    pub camera_device_id: u8,
10280}
10281impl CAMERA_INFORMATION_DATA {
10282    pub const ENCODED_LEN: usize = 237usize;
10283    pub const DEFAULT: Self = Self {
10284        time_boot_ms: 0_u32,
10285        firmware_version: 0_u32,
10286        focal_length: 0.0_f32,
10287        sensor_size_h: 0.0_f32,
10288        sensor_size_v: 0.0_f32,
10289        flags: CameraCapFlags::DEFAULT,
10290        resolution_h: 0_u16,
10291        resolution_v: 0_u16,
10292        cam_definition_version: 0_u16,
10293        vendor_name: [0_u8; 32usize],
10294        model_name: [0_u8; 32usize],
10295        lens_id: 0_u8,
10296        cam_definition_uri: CharArray::new([0_u8; 140usize]),
10297        gimbal_device_id: 0_u8,
10298        camera_device_id: 0_u8,
10299    };
10300    #[cfg(feature = "arbitrary")]
10301    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10302        use arbitrary::{Arbitrary, Unstructured};
10303        let mut buf = [0u8; 1024];
10304        rng.fill_bytes(&mut buf);
10305        let mut unstructured = Unstructured::new(&buf);
10306        Self::arbitrary(&mut unstructured).unwrap_or_default()
10307    }
10308}
10309impl Default for CAMERA_INFORMATION_DATA {
10310    fn default() -> Self {
10311        Self::DEFAULT.clone()
10312    }
10313}
10314impl MessageData for CAMERA_INFORMATION_DATA {
10315    type Message = MavMessage;
10316    const ID: u32 = 259u32;
10317    const NAME: &'static str = "CAMERA_INFORMATION";
10318    const EXTRA_CRC: u8 = 92u8;
10319    const ENCODED_LEN: usize = 237usize;
10320    fn deser(
10321        _version: MavlinkVersion,
10322        __input: &[u8],
10323    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10324        let avail_len = __input.len();
10325        let mut payload_buf = [0; Self::ENCODED_LEN];
10326        let mut buf = if avail_len < Self::ENCODED_LEN {
10327            payload_buf[0..avail_len].copy_from_slice(__input);
10328            Bytes::new(&payload_buf)
10329        } else {
10330            Bytes::new(__input)
10331        };
10332        let mut __struct = Self::default();
10333        __struct.time_boot_ms = buf.get_u32_le()?;
10334        __struct.firmware_version = buf.get_u32_le()?;
10335        __struct.focal_length = buf.get_f32_le()?;
10336        __struct.sensor_size_h = buf.get_f32_le()?;
10337        __struct.sensor_size_v = buf.get_f32_le()?;
10338        let tmp = buf.get_u32_le()?;
10339        __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
10340            ::mavlink_core::error::ParserError::InvalidFlag {
10341                flag_type: "CameraCapFlags",
10342                value: tmp as u64,
10343            },
10344        )?;
10345        __struct.resolution_h = buf.get_u16_le()?;
10346        __struct.resolution_v = buf.get_u16_le()?;
10347        __struct.cam_definition_version = buf.get_u16_le()?;
10348        for v in &mut __struct.vendor_name {
10349            let val = buf.get_u8()?;
10350            *v = val;
10351        }
10352        for v in &mut __struct.model_name {
10353            let val = buf.get_u8()?;
10354            *v = val;
10355        }
10356        __struct.lens_id = buf.get_u8()?;
10357        let mut tmp = [0_u8; 140usize];
10358        for v in &mut tmp {
10359            *v = buf.get_u8()?;
10360        }
10361        __struct.cam_definition_uri = CharArray::new(tmp);
10362        __struct.gimbal_device_id = buf.get_u8()?;
10363        __struct.camera_device_id = buf.get_u8()?;
10364        Ok(__struct)
10365    }
10366    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10367        let mut __tmp = BytesMut::new(bytes);
10368        #[allow(clippy::absurd_extreme_comparisons)]
10369        #[allow(unused_comparisons)]
10370        if __tmp.remaining() < Self::ENCODED_LEN {
10371            panic!(
10372                "buffer is too small (need {} bytes, but got {})",
10373                Self::ENCODED_LEN,
10374                __tmp.remaining(),
10375            )
10376        }
10377        __tmp.put_u32_le(self.time_boot_ms);
10378        __tmp.put_u32_le(self.firmware_version);
10379        __tmp.put_f32_le(self.focal_length);
10380        __tmp.put_f32_le(self.sensor_size_h);
10381        __tmp.put_f32_le(self.sensor_size_v);
10382        __tmp.put_u32_le(self.flags.bits() as u32);
10383        __tmp.put_u16_le(self.resolution_h);
10384        __tmp.put_u16_le(self.resolution_v);
10385        __tmp.put_u16_le(self.cam_definition_version);
10386        for val in &self.vendor_name {
10387            __tmp.put_u8(*val);
10388        }
10389        for val in &self.model_name {
10390            __tmp.put_u8(*val);
10391        }
10392        __tmp.put_u8(self.lens_id);
10393        for val in &self.cam_definition_uri {
10394            __tmp.put_u8(*val);
10395        }
10396        if matches!(version, MavlinkVersion::V2) {
10397            __tmp.put_u8(self.gimbal_device_id);
10398            __tmp.put_u8(self.camera_device_id);
10399            let len = __tmp.len();
10400            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10401        } else {
10402            __tmp.len()
10403        }
10404    }
10405}
10406#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
10407#[doc = ""]
10408#[doc = "ID: 260"]
10409#[derive(Debug, Clone, PartialEq)]
10410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10412#[cfg_attr(feature = "ts", derive(TS))]
10413#[cfg_attr(feature = "ts", ts(export))]
10414pub struct CAMERA_SETTINGS_DATA {
10415    #[doc = "Timestamp (time since system boot)."]
10416    pub time_boot_ms: u32,
10417    #[doc = "Camera mode"]
10418    pub mode_id: CameraMode,
10419    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
10420    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10421    pub zoomLevel: f32,
10422    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
10423    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10424    pub focusLevel: f32,
10425    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
10426    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10427    pub camera_device_id: u8,
10428}
10429impl CAMERA_SETTINGS_DATA {
10430    pub const ENCODED_LEN: usize = 14usize;
10431    pub const DEFAULT: Self = Self {
10432        time_boot_ms: 0_u32,
10433        mode_id: CameraMode::DEFAULT,
10434        zoomLevel: 0.0_f32,
10435        focusLevel: 0.0_f32,
10436        camera_device_id: 0_u8,
10437    };
10438    #[cfg(feature = "arbitrary")]
10439    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10440        use arbitrary::{Arbitrary, Unstructured};
10441        let mut buf = [0u8; 1024];
10442        rng.fill_bytes(&mut buf);
10443        let mut unstructured = Unstructured::new(&buf);
10444        Self::arbitrary(&mut unstructured).unwrap_or_default()
10445    }
10446}
10447impl Default for CAMERA_SETTINGS_DATA {
10448    fn default() -> Self {
10449        Self::DEFAULT.clone()
10450    }
10451}
10452impl MessageData for CAMERA_SETTINGS_DATA {
10453    type Message = MavMessage;
10454    const ID: u32 = 260u32;
10455    const NAME: &'static str = "CAMERA_SETTINGS";
10456    const EXTRA_CRC: u8 = 146u8;
10457    const ENCODED_LEN: usize = 14usize;
10458    fn deser(
10459        _version: MavlinkVersion,
10460        __input: &[u8],
10461    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10462        let avail_len = __input.len();
10463        let mut payload_buf = [0; Self::ENCODED_LEN];
10464        let mut buf = if avail_len < Self::ENCODED_LEN {
10465            payload_buf[0..avail_len].copy_from_slice(__input);
10466            Bytes::new(&payload_buf)
10467        } else {
10468            Bytes::new(__input)
10469        };
10470        let mut __struct = Self::default();
10471        __struct.time_boot_ms = buf.get_u32_le()?;
10472        let tmp = buf.get_u8()?;
10473        __struct.mode_id =
10474            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10475                enum_type: "CameraMode",
10476                value: tmp as u64,
10477            })?;
10478        __struct.zoomLevel = buf.get_f32_le()?;
10479        __struct.focusLevel = buf.get_f32_le()?;
10480        __struct.camera_device_id = buf.get_u8()?;
10481        Ok(__struct)
10482    }
10483    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10484        let mut __tmp = BytesMut::new(bytes);
10485        #[allow(clippy::absurd_extreme_comparisons)]
10486        #[allow(unused_comparisons)]
10487        if __tmp.remaining() < Self::ENCODED_LEN {
10488            panic!(
10489                "buffer is too small (need {} bytes, but got {})",
10490                Self::ENCODED_LEN,
10491                __tmp.remaining(),
10492            )
10493        }
10494        __tmp.put_u32_le(self.time_boot_ms);
10495        __tmp.put_u8(self.mode_id as u8);
10496        if matches!(version, MavlinkVersion::V2) {
10497            __tmp.put_f32_le(self.zoomLevel);
10498            __tmp.put_f32_le(self.focusLevel);
10499            __tmp.put_u8(self.camera_device_id);
10500            let len = __tmp.len();
10501            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10502        } else {
10503            __tmp.len()
10504        }
10505    }
10506}
10507#[doc = "Camera Event."]
10508#[doc = ""]
10509#[doc = "ID: 179"]
10510#[derive(Debug, Clone, PartialEq)]
10511#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10512#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10513#[cfg_attr(feature = "ts", derive(TS))]
10514#[cfg_attr(feature = "ts", ts(export))]
10515pub struct CAMERA_STATUS_DATA {
10516    #[doc = "Image timestamp (since UNIX epoch, according to camera clock)."]
10517    pub time_usec: u64,
10518    #[doc = "Parameter 1 (meaning depends on event_id, see CAMERA_STATUS_TYPES enum)."]
10519    pub p1: f32,
10520    #[doc = "Parameter 2 (meaning depends on event_id, see CAMERA_STATUS_TYPES enum)."]
10521    pub p2: f32,
10522    #[doc = "Parameter 3 (meaning depends on event_id, see CAMERA_STATUS_TYPES enum)."]
10523    pub p3: f32,
10524    #[doc = "Parameter 4 (meaning depends on event_id, see CAMERA_STATUS_TYPES enum)."]
10525    pub p4: f32,
10526    #[doc = "Image index."]
10527    pub img_idx: u16,
10528    #[doc = "System ID."]
10529    pub target_system: u8,
10530    #[doc = "Camera ID."]
10531    pub cam_idx: u8,
10532    #[doc = "Event type."]
10533    pub event_id: CameraStatusTypes,
10534}
10535impl CAMERA_STATUS_DATA {
10536    pub const ENCODED_LEN: usize = 29usize;
10537    pub const DEFAULT: Self = Self {
10538        time_usec: 0_u64,
10539        p1: 0.0_f32,
10540        p2: 0.0_f32,
10541        p3: 0.0_f32,
10542        p4: 0.0_f32,
10543        img_idx: 0_u16,
10544        target_system: 0_u8,
10545        cam_idx: 0_u8,
10546        event_id: CameraStatusTypes::DEFAULT,
10547    };
10548    #[cfg(feature = "arbitrary")]
10549    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10550        use arbitrary::{Arbitrary, Unstructured};
10551        let mut buf = [0u8; 1024];
10552        rng.fill_bytes(&mut buf);
10553        let mut unstructured = Unstructured::new(&buf);
10554        Self::arbitrary(&mut unstructured).unwrap_or_default()
10555    }
10556}
10557impl Default for CAMERA_STATUS_DATA {
10558    fn default() -> Self {
10559        Self::DEFAULT.clone()
10560    }
10561}
10562impl MessageData for CAMERA_STATUS_DATA {
10563    type Message = MavMessage;
10564    const ID: u32 = 179u32;
10565    const NAME: &'static str = "CAMERA_STATUS";
10566    const EXTRA_CRC: u8 = 189u8;
10567    const ENCODED_LEN: usize = 29usize;
10568    fn deser(
10569        _version: MavlinkVersion,
10570        __input: &[u8],
10571    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10572        let avail_len = __input.len();
10573        let mut payload_buf = [0; Self::ENCODED_LEN];
10574        let mut buf = if avail_len < Self::ENCODED_LEN {
10575            payload_buf[0..avail_len].copy_from_slice(__input);
10576            Bytes::new(&payload_buf)
10577        } else {
10578            Bytes::new(__input)
10579        };
10580        let mut __struct = Self::default();
10581        __struct.time_usec = buf.get_u64_le()?;
10582        __struct.p1 = buf.get_f32_le()?;
10583        __struct.p2 = buf.get_f32_le()?;
10584        __struct.p3 = buf.get_f32_le()?;
10585        __struct.p4 = buf.get_f32_le()?;
10586        __struct.img_idx = buf.get_u16_le()?;
10587        __struct.target_system = buf.get_u8()?;
10588        __struct.cam_idx = buf.get_u8()?;
10589        let tmp = buf.get_u8()?;
10590        __struct.event_id =
10591            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10592                enum_type: "CameraStatusTypes",
10593                value: tmp as u64,
10594            })?;
10595        Ok(__struct)
10596    }
10597    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10598        let mut __tmp = BytesMut::new(bytes);
10599        #[allow(clippy::absurd_extreme_comparisons)]
10600        #[allow(unused_comparisons)]
10601        if __tmp.remaining() < Self::ENCODED_LEN {
10602            panic!(
10603                "buffer is too small (need {} bytes, but got {})",
10604                Self::ENCODED_LEN,
10605                __tmp.remaining(),
10606            )
10607        }
10608        __tmp.put_u64_le(self.time_usec);
10609        __tmp.put_f32_le(self.p1);
10610        __tmp.put_f32_le(self.p2);
10611        __tmp.put_f32_le(self.p3);
10612        __tmp.put_f32_le(self.p4);
10613        __tmp.put_u16_le(self.img_idx);
10614        __tmp.put_u8(self.target_system);
10615        __tmp.put_u8(self.cam_idx);
10616        __tmp.put_u8(self.event_id as u8);
10617        if matches!(version, MavlinkVersion::V2) {
10618            let len = __tmp.len();
10619            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10620        } else {
10621            __tmp.len()
10622        }
10623    }
10624}
10625#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
10626#[doc = ""]
10627#[doc = "ID: 277"]
10628#[derive(Debug, Clone, PartialEq)]
10629#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10630#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10631#[cfg_attr(feature = "ts", derive(TS))]
10632#[cfg_attr(feature = "ts", ts(export))]
10633pub struct CAMERA_THERMAL_RANGE_DATA {
10634    #[doc = "Timestamp (time since system boot)."]
10635    pub time_boot_ms: u32,
10636    #[doc = "Temperature max."]
10637    pub max: f32,
10638    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
10639    pub max_point_x: f32,
10640    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
10641    pub max_point_y: f32,
10642    #[doc = "Temperature min."]
10643    pub min: f32,
10644    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
10645    pub min_point_x: f32,
10646    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
10647    pub min_point_y: f32,
10648    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
10649    pub stream_id: u8,
10650    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
10651    pub camera_device_id: u8,
10652}
10653impl CAMERA_THERMAL_RANGE_DATA {
10654    pub const ENCODED_LEN: usize = 30usize;
10655    pub const DEFAULT: Self = Self {
10656        time_boot_ms: 0_u32,
10657        max: 0.0_f32,
10658        max_point_x: 0.0_f32,
10659        max_point_y: 0.0_f32,
10660        min: 0.0_f32,
10661        min_point_x: 0.0_f32,
10662        min_point_y: 0.0_f32,
10663        stream_id: 0_u8,
10664        camera_device_id: 0_u8,
10665    };
10666    #[cfg(feature = "arbitrary")]
10667    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10668        use arbitrary::{Arbitrary, Unstructured};
10669        let mut buf = [0u8; 1024];
10670        rng.fill_bytes(&mut buf);
10671        let mut unstructured = Unstructured::new(&buf);
10672        Self::arbitrary(&mut unstructured).unwrap_or_default()
10673    }
10674}
10675impl Default for CAMERA_THERMAL_RANGE_DATA {
10676    fn default() -> Self {
10677        Self::DEFAULT.clone()
10678    }
10679}
10680impl MessageData for CAMERA_THERMAL_RANGE_DATA {
10681    type Message = MavMessage;
10682    const ID: u32 = 277u32;
10683    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
10684    const EXTRA_CRC: u8 = 62u8;
10685    const ENCODED_LEN: usize = 30usize;
10686    fn deser(
10687        _version: MavlinkVersion,
10688        __input: &[u8],
10689    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10690        let avail_len = __input.len();
10691        let mut payload_buf = [0; Self::ENCODED_LEN];
10692        let mut buf = if avail_len < Self::ENCODED_LEN {
10693            payload_buf[0..avail_len].copy_from_slice(__input);
10694            Bytes::new(&payload_buf)
10695        } else {
10696            Bytes::new(__input)
10697        };
10698        let mut __struct = Self::default();
10699        __struct.time_boot_ms = buf.get_u32_le()?;
10700        __struct.max = buf.get_f32_le()?;
10701        __struct.max_point_x = buf.get_f32_le()?;
10702        __struct.max_point_y = buf.get_f32_le()?;
10703        __struct.min = buf.get_f32_le()?;
10704        __struct.min_point_x = buf.get_f32_le()?;
10705        __struct.min_point_y = buf.get_f32_le()?;
10706        __struct.stream_id = buf.get_u8()?;
10707        __struct.camera_device_id = buf.get_u8()?;
10708        Ok(__struct)
10709    }
10710    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10711        let mut __tmp = BytesMut::new(bytes);
10712        #[allow(clippy::absurd_extreme_comparisons)]
10713        #[allow(unused_comparisons)]
10714        if __tmp.remaining() < Self::ENCODED_LEN {
10715            panic!(
10716                "buffer is too small (need {} bytes, but got {})",
10717                Self::ENCODED_LEN,
10718                __tmp.remaining(),
10719            )
10720        }
10721        __tmp.put_u32_le(self.time_boot_ms);
10722        __tmp.put_f32_le(self.max);
10723        __tmp.put_f32_le(self.max_point_x);
10724        __tmp.put_f32_le(self.max_point_y);
10725        __tmp.put_f32_le(self.min);
10726        __tmp.put_f32_le(self.min_point_x);
10727        __tmp.put_f32_le(self.min_point_y);
10728        __tmp.put_u8(self.stream_id);
10729        __tmp.put_u8(self.camera_device_id);
10730        if matches!(version, MavlinkVersion::V2) {
10731            let len = __tmp.len();
10732            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10733        } else {
10734            __tmp.len()
10735        }
10736    }
10737}
10738#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
10739#[doc = ""]
10740#[doc = "ID: 276"]
10741#[derive(Debug, Clone, PartialEq)]
10742#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10743#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10744#[cfg_attr(feature = "ts", derive(TS))]
10745#[cfg_attr(feature = "ts", ts(export))]
10746pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
10747    #[doc = "Latitude of tracked object"]
10748    pub lat: i32,
10749    #[doc = "Longitude of tracked object"]
10750    pub lon: i32,
10751    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
10752    pub alt: f32,
10753    #[doc = "Horizontal accuracy. NAN if unknown"]
10754    pub h_acc: f32,
10755    #[doc = "Vertical accuracy. NAN if unknown"]
10756    pub v_acc: f32,
10757    #[doc = "North velocity of tracked object. NAN if unknown"]
10758    pub vel_n: f32,
10759    #[doc = "East velocity of tracked object. NAN if unknown"]
10760    pub vel_e: f32,
10761    #[doc = "Down velocity of tracked object. NAN if unknown"]
10762    pub vel_d: f32,
10763    #[doc = "Velocity accuracy. NAN if unknown"]
10764    pub vel_acc: f32,
10765    #[doc = "Distance between camera and tracked object. NAN if unknown"]
10766    pub dist: f32,
10767    #[doc = "Heading in radians, in NED. NAN if unknown"]
10768    pub hdg: f32,
10769    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
10770    pub hdg_acc: f32,
10771    #[doc = "Current tracking status"]
10772    pub tracking_status: CameraTrackingStatusFlags,
10773    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
10774    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10775    pub camera_device_id: u8,
10776}
10777impl CAMERA_TRACKING_GEO_STATUS_DATA {
10778    pub const ENCODED_LEN: usize = 50usize;
10779    pub const DEFAULT: Self = Self {
10780        lat: 0_i32,
10781        lon: 0_i32,
10782        alt: 0.0_f32,
10783        h_acc: 0.0_f32,
10784        v_acc: 0.0_f32,
10785        vel_n: 0.0_f32,
10786        vel_e: 0.0_f32,
10787        vel_d: 0.0_f32,
10788        vel_acc: 0.0_f32,
10789        dist: 0.0_f32,
10790        hdg: 0.0_f32,
10791        hdg_acc: 0.0_f32,
10792        tracking_status: CameraTrackingStatusFlags::DEFAULT,
10793        camera_device_id: 0_u8,
10794    };
10795    #[cfg(feature = "arbitrary")]
10796    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10797        use arbitrary::{Arbitrary, Unstructured};
10798        let mut buf = [0u8; 1024];
10799        rng.fill_bytes(&mut buf);
10800        let mut unstructured = Unstructured::new(&buf);
10801        Self::arbitrary(&mut unstructured).unwrap_or_default()
10802    }
10803}
10804impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
10805    fn default() -> Self {
10806        Self::DEFAULT.clone()
10807    }
10808}
10809impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
10810    type Message = MavMessage;
10811    const ID: u32 = 276u32;
10812    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
10813    const EXTRA_CRC: u8 = 18u8;
10814    const ENCODED_LEN: usize = 50usize;
10815    fn deser(
10816        _version: MavlinkVersion,
10817        __input: &[u8],
10818    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10819        let avail_len = __input.len();
10820        let mut payload_buf = [0; Self::ENCODED_LEN];
10821        let mut buf = if avail_len < Self::ENCODED_LEN {
10822            payload_buf[0..avail_len].copy_from_slice(__input);
10823            Bytes::new(&payload_buf)
10824        } else {
10825            Bytes::new(__input)
10826        };
10827        let mut __struct = Self::default();
10828        __struct.lat = buf.get_i32_le()?;
10829        __struct.lon = buf.get_i32_le()?;
10830        __struct.alt = buf.get_f32_le()?;
10831        __struct.h_acc = buf.get_f32_le()?;
10832        __struct.v_acc = buf.get_f32_le()?;
10833        __struct.vel_n = buf.get_f32_le()?;
10834        __struct.vel_e = buf.get_f32_le()?;
10835        __struct.vel_d = buf.get_f32_le()?;
10836        __struct.vel_acc = buf.get_f32_le()?;
10837        __struct.dist = buf.get_f32_le()?;
10838        __struct.hdg = buf.get_f32_le()?;
10839        __struct.hdg_acc = buf.get_f32_le()?;
10840        let tmp = buf.get_u8()?;
10841        __struct.tracking_status =
10842            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10843                enum_type: "CameraTrackingStatusFlags",
10844                value: tmp as u64,
10845            })?;
10846        __struct.camera_device_id = buf.get_u8()?;
10847        Ok(__struct)
10848    }
10849    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10850        let mut __tmp = BytesMut::new(bytes);
10851        #[allow(clippy::absurd_extreme_comparisons)]
10852        #[allow(unused_comparisons)]
10853        if __tmp.remaining() < Self::ENCODED_LEN {
10854            panic!(
10855                "buffer is too small (need {} bytes, but got {})",
10856                Self::ENCODED_LEN,
10857                __tmp.remaining(),
10858            )
10859        }
10860        __tmp.put_i32_le(self.lat);
10861        __tmp.put_i32_le(self.lon);
10862        __tmp.put_f32_le(self.alt);
10863        __tmp.put_f32_le(self.h_acc);
10864        __tmp.put_f32_le(self.v_acc);
10865        __tmp.put_f32_le(self.vel_n);
10866        __tmp.put_f32_le(self.vel_e);
10867        __tmp.put_f32_le(self.vel_d);
10868        __tmp.put_f32_le(self.vel_acc);
10869        __tmp.put_f32_le(self.dist);
10870        __tmp.put_f32_le(self.hdg);
10871        __tmp.put_f32_le(self.hdg_acc);
10872        __tmp.put_u8(self.tracking_status as u8);
10873        if matches!(version, MavlinkVersion::V2) {
10874            __tmp.put_u8(self.camera_device_id);
10875            let len = __tmp.len();
10876            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10877        } else {
10878            __tmp.len()
10879        }
10880    }
10881}
10882#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
10883#[doc = ""]
10884#[doc = "ID: 275"]
10885#[derive(Debug, Clone, PartialEq)]
10886#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10887#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10888#[cfg_attr(feature = "ts", derive(TS))]
10889#[cfg_attr(feature = "ts", ts(export))]
10890pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
10891    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
10892    pub point_x: f32,
10893    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
10894    pub point_y: f32,
10895    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
10896    pub radius: f32,
10897    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
10898    pub rec_top_x: f32,
10899    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
10900    pub rec_top_y: f32,
10901    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
10902    pub rec_bottom_x: f32,
10903    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
10904    pub rec_bottom_y: f32,
10905    #[doc = "Current tracking status"]
10906    pub tracking_status: CameraTrackingStatusFlags,
10907    #[doc = "Current tracking mode"]
10908    pub tracking_mode: CameraTrackingMode,
10909    #[doc = "Defines location of target data"]
10910    pub target_data: CameraTrackingTargetData,
10911    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
10912    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10913    pub camera_device_id: u8,
10914}
10915impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
10916    pub const ENCODED_LEN: usize = 32usize;
10917    pub const DEFAULT: Self = Self {
10918        point_x: 0.0_f32,
10919        point_y: 0.0_f32,
10920        radius: 0.0_f32,
10921        rec_top_x: 0.0_f32,
10922        rec_top_y: 0.0_f32,
10923        rec_bottom_x: 0.0_f32,
10924        rec_bottom_y: 0.0_f32,
10925        tracking_status: CameraTrackingStatusFlags::DEFAULT,
10926        tracking_mode: CameraTrackingMode::DEFAULT,
10927        target_data: CameraTrackingTargetData::DEFAULT,
10928        camera_device_id: 0_u8,
10929    };
10930    #[cfg(feature = "arbitrary")]
10931    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10932        use arbitrary::{Arbitrary, Unstructured};
10933        let mut buf = [0u8; 1024];
10934        rng.fill_bytes(&mut buf);
10935        let mut unstructured = Unstructured::new(&buf);
10936        Self::arbitrary(&mut unstructured).unwrap_or_default()
10937    }
10938}
10939impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
10940    fn default() -> Self {
10941        Self::DEFAULT.clone()
10942    }
10943}
10944impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
10945    type Message = MavMessage;
10946    const ID: u32 = 275u32;
10947    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
10948    const EXTRA_CRC: u8 = 126u8;
10949    const ENCODED_LEN: usize = 32usize;
10950    fn deser(
10951        _version: MavlinkVersion,
10952        __input: &[u8],
10953    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10954        let avail_len = __input.len();
10955        let mut payload_buf = [0; Self::ENCODED_LEN];
10956        let mut buf = if avail_len < Self::ENCODED_LEN {
10957            payload_buf[0..avail_len].copy_from_slice(__input);
10958            Bytes::new(&payload_buf)
10959        } else {
10960            Bytes::new(__input)
10961        };
10962        let mut __struct = Self::default();
10963        __struct.point_x = buf.get_f32_le()?;
10964        __struct.point_y = buf.get_f32_le()?;
10965        __struct.radius = buf.get_f32_le()?;
10966        __struct.rec_top_x = buf.get_f32_le()?;
10967        __struct.rec_top_y = buf.get_f32_le()?;
10968        __struct.rec_bottom_x = buf.get_f32_le()?;
10969        __struct.rec_bottom_y = buf.get_f32_le()?;
10970        let tmp = buf.get_u8()?;
10971        __struct.tracking_status =
10972            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10973                enum_type: "CameraTrackingStatusFlags",
10974                value: tmp as u64,
10975            })?;
10976        let tmp = buf.get_u8()?;
10977        __struct.tracking_mode =
10978            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10979                enum_type: "CameraTrackingMode",
10980                value: tmp as u64,
10981            })?;
10982        let tmp = buf.get_u8()?;
10983        __struct.target_data =
10984            CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
10985                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10986                flag_type: "CameraTrackingTargetData",
10987                value: tmp as u64,
10988            })?;
10989        __struct.camera_device_id = buf.get_u8()?;
10990        Ok(__struct)
10991    }
10992    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10993        let mut __tmp = BytesMut::new(bytes);
10994        #[allow(clippy::absurd_extreme_comparisons)]
10995        #[allow(unused_comparisons)]
10996        if __tmp.remaining() < Self::ENCODED_LEN {
10997            panic!(
10998                "buffer is too small (need {} bytes, but got {})",
10999                Self::ENCODED_LEN,
11000                __tmp.remaining(),
11001            )
11002        }
11003        __tmp.put_f32_le(self.point_x);
11004        __tmp.put_f32_le(self.point_y);
11005        __tmp.put_f32_le(self.radius);
11006        __tmp.put_f32_le(self.rec_top_x);
11007        __tmp.put_f32_le(self.rec_top_y);
11008        __tmp.put_f32_le(self.rec_bottom_x);
11009        __tmp.put_f32_le(self.rec_bottom_y);
11010        __tmp.put_u8(self.tracking_status as u8);
11011        __tmp.put_u8(self.tracking_mode as u8);
11012        __tmp.put_u8(self.target_data.bits() as u8);
11013        if matches!(version, MavlinkVersion::V2) {
11014            __tmp.put_u8(self.camera_device_id);
11015            let len = __tmp.len();
11016            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11017        } else {
11018            __tmp.len()
11019        }
11020    }
11021}
11022#[doc = "Camera-IMU triggering and synchronisation message."]
11023#[doc = ""]
11024#[doc = "ID: 112"]
11025#[derive(Debug, Clone, PartialEq)]
11026#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11027#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11028#[cfg_attr(feature = "ts", derive(TS))]
11029#[cfg_attr(feature = "ts", ts(export))]
11030pub struct CAMERA_TRIGGER_DATA {
11031    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11032    pub time_usec: u64,
11033    #[doc = "Image frame sequence"]
11034    pub seq: u32,
11035}
11036impl CAMERA_TRIGGER_DATA {
11037    pub const ENCODED_LEN: usize = 12usize;
11038    pub const DEFAULT: Self = Self {
11039        time_usec: 0_u64,
11040        seq: 0_u32,
11041    };
11042    #[cfg(feature = "arbitrary")]
11043    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11044        use arbitrary::{Arbitrary, Unstructured};
11045        let mut buf = [0u8; 1024];
11046        rng.fill_bytes(&mut buf);
11047        let mut unstructured = Unstructured::new(&buf);
11048        Self::arbitrary(&mut unstructured).unwrap_or_default()
11049    }
11050}
11051impl Default for CAMERA_TRIGGER_DATA {
11052    fn default() -> Self {
11053        Self::DEFAULT.clone()
11054    }
11055}
11056impl MessageData for CAMERA_TRIGGER_DATA {
11057    type Message = MavMessage;
11058    const ID: u32 = 112u32;
11059    const NAME: &'static str = "CAMERA_TRIGGER";
11060    const EXTRA_CRC: u8 = 174u8;
11061    const ENCODED_LEN: usize = 12usize;
11062    fn deser(
11063        _version: MavlinkVersion,
11064        __input: &[u8],
11065    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11066        let avail_len = __input.len();
11067        let mut payload_buf = [0; Self::ENCODED_LEN];
11068        let mut buf = if avail_len < Self::ENCODED_LEN {
11069            payload_buf[0..avail_len].copy_from_slice(__input);
11070            Bytes::new(&payload_buf)
11071        } else {
11072            Bytes::new(__input)
11073        };
11074        let mut __struct = Self::default();
11075        __struct.time_usec = buf.get_u64_le()?;
11076        __struct.seq = buf.get_u32_le()?;
11077        Ok(__struct)
11078    }
11079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11080        let mut __tmp = BytesMut::new(bytes);
11081        #[allow(clippy::absurd_extreme_comparisons)]
11082        #[allow(unused_comparisons)]
11083        if __tmp.remaining() < Self::ENCODED_LEN {
11084            panic!(
11085                "buffer is too small (need {} bytes, but got {})",
11086                Self::ENCODED_LEN,
11087                __tmp.remaining(),
11088            )
11089        }
11090        __tmp.put_u64_le(self.time_usec);
11091        __tmp.put_u32_le(self.seq);
11092        if matches!(version, MavlinkVersion::V2) {
11093            let len = __tmp.len();
11094            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11095        } else {
11096            __tmp.len()
11097        }
11098    }
11099}
11100#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
11101#[doc = ""]
11102#[doc = "ID: 387"]
11103#[derive(Debug, Clone, PartialEq)]
11104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11106#[cfg_attr(feature = "ts", derive(TS))]
11107#[cfg_attr(feature = "ts", ts(export))]
11108pub struct CANFD_FRAME_DATA {
11109    #[doc = "Frame ID"]
11110    pub id: u32,
11111    #[doc = "System ID."]
11112    pub target_system: u8,
11113    #[doc = "Component ID."]
11114    pub target_component: u8,
11115    #[doc = "bus number"]
11116    pub bus: u8,
11117    #[doc = "Frame length"]
11118    pub len: u8,
11119    #[doc = "Frame data"]
11120    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11121    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11122    pub data: [u8; 64],
11123}
11124impl CANFD_FRAME_DATA {
11125    pub const ENCODED_LEN: usize = 72usize;
11126    pub const DEFAULT: Self = Self {
11127        id: 0_u32,
11128        target_system: 0_u8,
11129        target_component: 0_u8,
11130        bus: 0_u8,
11131        len: 0_u8,
11132        data: [0_u8; 64usize],
11133    };
11134    #[cfg(feature = "arbitrary")]
11135    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11136        use arbitrary::{Arbitrary, Unstructured};
11137        let mut buf = [0u8; 1024];
11138        rng.fill_bytes(&mut buf);
11139        let mut unstructured = Unstructured::new(&buf);
11140        Self::arbitrary(&mut unstructured).unwrap_or_default()
11141    }
11142}
11143impl Default for CANFD_FRAME_DATA {
11144    fn default() -> Self {
11145        Self::DEFAULT.clone()
11146    }
11147}
11148impl MessageData for CANFD_FRAME_DATA {
11149    type Message = MavMessage;
11150    const ID: u32 = 387u32;
11151    const NAME: &'static str = "CANFD_FRAME";
11152    const EXTRA_CRC: u8 = 4u8;
11153    const ENCODED_LEN: usize = 72usize;
11154    fn deser(
11155        _version: MavlinkVersion,
11156        __input: &[u8],
11157    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11158        let avail_len = __input.len();
11159        let mut payload_buf = [0; Self::ENCODED_LEN];
11160        let mut buf = if avail_len < Self::ENCODED_LEN {
11161            payload_buf[0..avail_len].copy_from_slice(__input);
11162            Bytes::new(&payload_buf)
11163        } else {
11164            Bytes::new(__input)
11165        };
11166        let mut __struct = Self::default();
11167        __struct.id = buf.get_u32_le()?;
11168        __struct.target_system = buf.get_u8()?;
11169        __struct.target_component = buf.get_u8()?;
11170        __struct.bus = buf.get_u8()?;
11171        __struct.len = buf.get_u8()?;
11172        for v in &mut __struct.data {
11173            let val = buf.get_u8()?;
11174            *v = val;
11175        }
11176        Ok(__struct)
11177    }
11178    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11179        let mut __tmp = BytesMut::new(bytes);
11180        #[allow(clippy::absurd_extreme_comparisons)]
11181        #[allow(unused_comparisons)]
11182        if __tmp.remaining() < Self::ENCODED_LEN {
11183            panic!(
11184                "buffer is too small (need {} bytes, but got {})",
11185                Self::ENCODED_LEN,
11186                __tmp.remaining(),
11187            )
11188        }
11189        __tmp.put_u32_le(self.id);
11190        __tmp.put_u8(self.target_system);
11191        __tmp.put_u8(self.target_component);
11192        __tmp.put_u8(self.bus);
11193        __tmp.put_u8(self.len);
11194        for val in &self.data {
11195            __tmp.put_u8(*val);
11196        }
11197        if matches!(version, MavlinkVersion::V2) {
11198            let len = __tmp.len();
11199            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11200        } else {
11201            __tmp.len()
11202        }
11203    }
11204}
11205#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
11206#[doc = ""]
11207#[doc = "ID: 388"]
11208#[derive(Debug, Clone, PartialEq)]
11209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11211#[cfg_attr(feature = "ts", derive(TS))]
11212#[cfg_attr(feature = "ts", ts(export))]
11213pub struct CAN_FILTER_MODIFY_DATA {
11214    #[doc = "filter IDs, length num_ids"]
11215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11216    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11217    pub ids: [u16; 16],
11218    #[doc = "System ID."]
11219    pub target_system: u8,
11220    #[doc = "Component ID."]
11221    pub target_component: u8,
11222    #[doc = "bus number"]
11223    pub bus: u8,
11224    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
11225    pub operation: CanFilterOp,
11226    #[doc = "number of IDs in filter list"]
11227    pub num_ids: u8,
11228}
11229impl CAN_FILTER_MODIFY_DATA {
11230    pub const ENCODED_LEN: usize = 37usize;
11231    pub const DEFAULT: Self = Self {
11232        ids: [0_u16; 16usize],
11233        target_system: 0_u8,
11234        target_component: 0_u8,
11235        bus: 0_u8,
11236        operation: CanFilterOp::DEFAULT,
11237        num_ids: 0_u8,
11238    };
11239    #[cfg(feature = "arbitrary")]
11240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11241        use arbitrary::{Arbitrary, Unstructured};
11242        let mut buf = [0u8; 1024];
11243        rng.fill_bytes(&mut buf);
11244        let mut unstructured = Unstructured::new(&buf);
11245        Self::arbitrary(&mut unstructured).unwrap_or_default()
11246    }
11247}
11248impl Default for CAN_FILTER_MODIFY_DATA {
11249    fn default() -> Self {
11250        Self::DEFAULT.clone()
11251    }
11252}
11253impl MessageData for CAN_FILTER_MODIFY_DATA {
11254    type Message = MavMessage;
11255    const ID: u32 = 388u32;
11256    const NAME: &'static str = "CAN_FILTER_MODIFY";
11257    const EXTRA_CRC: u8 = 8u8;
11258    const ENCODED_LEN: usize = 37usize;
11259    fn deser(
11260        _version: MavlinkVersion,
11261        __input: &[u8],
11262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11263        let avail_len = __input.len();
11264        let mut payload_buf = [0; Self::ENCODED_LEN];
11265        let mut buf = if avail_len < Self::ENCODED_LEN {
11266            payload_buf[0..avail_len].copy_from_slice(__input);
11267            Bytes::new(&payload_buf)
11268        } else {
11269            Bytes::new(__input)
11270        };
11271        let mut __struct = Self::default();
11272        for v in &mut __struct.ids {
11273            let val = buf.get_u16_le()?;
11274            *v = val;
11275        }
11276        __struct.target_system = buf.get_u8()?;
11277        __struct.target_component = buf.get_u8()?;
11278        __struct.bus = buf.get_u8()?;
11279        let tmp = buf.get_u8()?;
11280        __struct.operation =
11281            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11282                enum_type: "CanFilterOp",
11283                value: tmp as u64,
11284            })?;
11285        __struct.num_ids = buf.get_u8()?;
11286        Ok(__struct)
11287    }
11288    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11289        let mut __tmp = BytesMut::new(bytes);
11290        #[allow(clippy::absurd_extreme_comparisons)]
11291        #[allow(unused_comparisons)]
11292        if __tmp.remaining() < Self::ENCODED_LEN {
11293            panic!(
11294                "buffer is too small (need {} bytes, but got {})",
11295                Self::ENCODED_LEN,
11296                __tmp.remaining(),
11297            )
11298        }
11299        for val in &self.ids {
11300            __tmp.put_u16_le(*val);
11301        }
11302        __tmp.put_u8(self.target_system);
11303        __tmp.put_u8(self.target_component);
11304        __tmp.put_u8(self.bus);
11305        __tmp.put_u8(self.operation as u8);
11306        __tmp.put_u8(self.num_ids);
11307        if matches!(version, MavlinkVersion::V2) {
11308            let len = __tmp.len();
11309            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11310        } else {
11311            __tmp.len()
11312        }
11313    }
11314}
11315#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
11316#[doc = ""]
11317#[doc = "ID: 386"]
11318#[derive(Debug, Clone, PartialEq)]
11319#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11320#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11321#[cfg_attr(feature = "ts", derive(TS))]
11322#[cfg_attr(feature = "ts", ts(export))]
11323pub struct CAN_FRAME_DATA {
11324    #[doc = "Frame ID"]
11325    pub id: u32,
11326    #[doc = "System ID."]
11327    pub target_system: u8,
11328    #[doc = "Component ID."]
11329    pub target_component: u8,
11330    #[doc = "Bus number"]
11331    pub bus: u8,
11332    #[doc = "Frame length"]
11333    pub len: u8,
11334    #[doc = "Frame data"]
11335    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11336    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11337    pub data: [u8; 8],
11338}
11339impl CAN_FRAME_DATA {
11340    pub const ENCODED_LEN: usize = 16usize;
11341    pub const DEFAULT: Self = Self {
11342        id: 0_u32,
11343        target_system: 0_u8,
11344        target_component: 0_u8,
11345        bus: 0_u8,
11346        len: 0_u8,
11347        data: [0_u8; 8usize],
11348    };
11349    #[cfg(feature = "arbitrary")]
11350    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11351        use arbitrary::{Arbitrary, Unstructured};
11352        let mut buf = [0u8; 1024];
11353        rng.fill_bytes(&mut buf);
11354        let mut unstructured = Unstructured::new(&buf);
11355        Self::arbitrary(&mut unstructured).unwrap_or_default()
11356    }
11357}
11358impl Default for CAN_FRAME_DATA {
11359    fn default() -> Self {
11360        Self::DEFAULT.clone()
11361    }
11362}
11363impl MessageData for CAN_FRAME_DATA {
11364    type Message = MavMessage;
11365    const ID: u32 = 386u32;
11366    const NAME: &'static str = "CAN_FRAME";
11367    const EXTRA_CRC: u8 = 132u8;
11368    const ENCODED_LEN: usize = 16usize;
11369    fn deser(
11370        _version: MavlinkVersion,
11371        __input: &[u8],
11372    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11373        let avail_len = __input.len();
11374        let mut payload_buf = [0; Self::ENCODED_LEN];
11375        let mut buf = if avail_len < Self::ENCODED_LEN {
11376            payload_buf[0..avail_len].copy_from_slice(__input);
11377            Bytes::new(&payload_buf)
11378        } else {
11379            Bytes::new(__input)
11380        };
11381        let mut __struct = Self::default();
11382        __struct.id = buf.get_u32_le()?;
11383        __struct.target_system = buf.get_u8()?;
11384        __struct.target_component = buf.get_u8()?;
11385        __struct.bus = buf.get_u8()?;
11386        __struct.len = buf.get_u8()?;
11387        for v in &mut __struct.data {
11388            let val = buf.get_u8()?;
11389            *v = val;
11390        }
11391        Ok(__struct)
11392    }
11393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11394        let mut __tmp = BytesMut::new(bytes);
11395        #[allow(clippy::absurd_extreme_comparisons)]
11396        #[allow(unused_comparisons)]
11397        if __tmp.remaining() < Self::ENCODED_LEN {
11398            panic!(
11399                "buffer is too small (need {} bytes, but got {})",
11400                Self::ENCODED_LEN,
11401                __tmp.remaining(),
11402            )
11403        }
11404        __tmp.put_u32_le(self.id);
11405        __tmp.put_u8(self.target_system);
11406        __tmp.put_u8(self.target_component);
11407        __tmp.put_u8(self.bus);
11408        __tmp.put_u8(self.len);
11409        for val in &self.data {
11410            __tmp.put_u8(*val);
11411        }
11412        if matches!(version, MavlinkVersion::V2) {
11413            let len = __tmp.len();
11414            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11415        } else {
11416            __tmp.len()
11417        }
11418    }
11419}
11420#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
11421#[doc = ""]
11422#[doc = "ID: 336"]
11423#[derive(Debug, Clone, PartialEq)]
11424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11426#[cfg_attr(feature = "ts", derive(TS))]
11427#[cfg_attr(feature = "ts", ts(export))]
11428pub struct CELLULAR_CONFIG_DATA {
11429    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
11430    pub enable_lte: u8,
11431    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
11432    pub enable_pin: u8,
11433    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
11434    #[cfg_attr(feature = "ts", ts(type = "string"))]
11435    pub pin: CharArray<16>,
11436    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
11437    #[cfg_attr(feature = "ts", ts(type = "string"))]
11438    pub new_pin: CharArray<16>,
11439    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
11440    #[cfg_attr(feature = "ts", ts(type = "string"))]
11441    pub apn: CharArray<32>,
11442    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
11443    #[cfg_attr(feature = "ts", ts(type = "string"))]
11444    pub puk: CharArray<16>,
11445    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
11446    pub roaming: u8,
11447    #[doc = "Message acceptance response (sent back to GS)."]
11448    pub response: CellularConfigResponse,
11449}
11450impl CELLULAR_CONFIG_DATA {
11451    pub const ENCODED_LEN: usize = 84usize;
11452    pub const DEFAULT: Self = Self {
11453        enable_lte: 0_u8,
11454        enable_pin: 0_u8,
11455        pin: CharArray::new([0_u8; 16usize]),
11456        new_pin: CharArray::new([0_u8; 16usize]),
11457        apn: CharArray::new([0_u8; 32usize]),
11458        puk: CharArray::new([0_u8; 16usize]),
11459        roaming: 0_u8,
11460        response: CellularConfigResponse::DEFAULT,
11461    };
11462    #[cfg(feature = "arbitrary")]
11463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11464        use arbitrary::{Arbitrary, Unstructured};
11465        let mut buf = [0u8; 1024];
11466        rng.fill_bytes(&mut buf);
11467        let mut unstructured = Unstructured::new(&buf);
11468        Self::arbitrary(&mut unstructured).unwrap_or_default()
11469    }
11470}
11471impl Default for CELLULAR_CONFIG_DATA {
11472    fn default() -> Self {
11473        Self::DEFAULT.clone()
11474    }
11475}
11476impl MessageData for CELLULAR_CONFIG_DATA {
11477    type Message = MavMessage;
11478    const ID: u32 = 336u32;
11479    const NAME: &'static str = "CELLULAR_CONFIG";
11480    const EXTRA_CRC: u8 = 245u8;
11481    const ENCODED_LEN: usize = 84usize;
11482    fn deser(
11483        _version: MavlinkVersion,
11484        __input: &[u8],
11485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11486        let avail_len = __input.len();
11487        let mut payload_buf = [0; Self::ENCODED_LEN];
11488        let mut buf = if avail_len < Self::ENCODED_LEN {
11489            payload_buf[0..avail_len].copy_from_slice(__input);
11490            Bytes::new(&payload_buf)
11491        } else {
11492            Bytes::new(__input)
11493        };
11494        let mut __struct = Self::default();
11495        __struct.enable_lte = buf.get_u8()?;
11496        __struct.enable_pin = buf.get_u8()?;
11497        let mut tmp = [0_u8; 16usize];
11498        for v in &mut tmp {
11499            *v = buf.get_u8()?;
11500        }
11501        __struct.pin = CharArray::new(tmp);
11502        let mut tmp = [0_u8; 16usize];
11503        for v in &mut tmp {
11504            *v = buf.get_u8()?;
11505        }
11506        __struct.new_pin = CharArray::new(tmp);
11507        let mut tmp = [0_u8; 32usize];
11508        for v in &mut tmp {
11509            *v = buf.get_u8()?;
11510        }
11511        __struct.apn = CharArray::new(tmp);
11512        let mut tmp = [0_u8; 16usize];
11513        for v in &mut tmp {
11514            *v = buf.get_u8()?;
11515        }
11516        __struct.puk = CharArray::new(tmp);
11517        __struct.roaming = buf.get_u8()?;
11518        let tmp = buf.get_u8()?;
11519        __struct.response =
11520            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11521                enum_type: "CellularConfigResponse",
11522                value: tmp as u64,
11523            })?;
11524        Ok(__struct)
11525    }
11526    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11527        let mut __tmp = BytesMut::new(bytes);
11528        #[allow(clippy::absurd_extreme_comparisons)]
11529        #[allow(unused_comparisons)]
11530        if __tmp.remaining() < Self::ENCODED_LEN {
11531            panic!(
11532                "buffer is too small (need {} bytes, but got {})",
11533                Self::ENCODED_LEN,
11534                __tmp.remaining(),
11535            )
11536        }
11537        __tmp.put_u8(self.enable_lte);
11538        __tmp.put_u8(self.enable_pin);
11539        for val in &self.pin {
11540            __tmp.put_u8(*val);
11541        }
11542        for val in &self.new_pin {
11543            __tmp.put_u8(*val);
11544        }
11545        for val in &self.apn {
11546            __tmp.put_u8(*val);
11547        }
11548        for val in &self.puk {
11549            __tmp.put_u8(*val);
11550        }
11551        __tmp.put_u8(self.roaming);
11552        __tmp.put_u8(self.response as u8);
11553        if matches!(version, MavlinkVersion::V2) {
11554            let len = __tmp.len();
11555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11556        } else {
11557            __tmp.len()
11558        }
11559    }
11560}
11561#[doc = "Report current used cellular network status."]
11562#[doc = ""]
11563#[doc = "ID: 334"]
11564#[derive(Debug, Clone, PartialEq)]
11565#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11567#[cfg_attr(feature = "ts", derive(TS))]
11568#[cfg_attr(feature = "ts", ts(export))]
11569pub struct CELLULAR_STATUS_DATA {
11570    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
11571    pub mcc: u16,
11572    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
11573    pub mnc: u16,
11574    #[doc = "Location area code. If unknown, set to 0"]
11575    pub lac: u16,
11576    #[doc = "Cellular modem status"]
11577    pub status: CellularStatusFlag,
11578    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
11579    pub failure_reason: CellularNetworkFailedReason,
11580    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
11581    pub mavtype: CellularNetworkRadioType,
11582    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
11583    pub quality: u8,
11584}
11585impl CELLULAR_STATUS_DATA {
11586    pub const ENCODED_LEN: usize = 10usize;
11587    pub const DEFAULT: Self = Self {
11588        mcc: 0_u16,
11589        mnc: 0_u16,
11590        lac: 0_u16,
11591        status: CellularStatusFlag::DEFAULT,
11592        failure_reason: CellularNetworkFailedReason::DEFAULT,
11593        mavtype: CellularNetworkRadioType::DEFAULT,
11594        quality: 0_u8,
11595    };
11596    #[cfg(feature = "arbitrary")]
11597    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11598        use arbitrary::{Arbitrary, Unstructured};
11599        let mut buf = [0u8; 1024];
11600        rng.fill_bytes(&mut buf);
11601        let mut unstructured = Unstructured::new(&buf);
11602        Self::arbitrary(&mut unstructured).unwrap_or_default()
11603    }
11604}
11605impl Default for CELLULAR_STATUS_DATA {
11606    fn default() -> Self {
11607        Self::DEFAULT.clone()
11608    }
11609}
11610impl MessageData for CELLULAR_STATUS_DATA {
11611    type Message = MavMessage;
11612    const ID: u32 = 334u32;
11613    const NAME: &'static str = "CELLULAR_STATUS";
11614    const EXTRA_CRC: u8 = 72u8;
11615    const ENCODED_LEN: usize = 10usize;
11616    fn deser(
11617        _version: MavlinkVersion,
11618        __input: &[u8],
11619    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11620        let avail_len = __input.len();
11621        let mut payload_buf = [0; Self::ENCODED_LEN];
11622        let mut buf = if avail_len < Self::ENCODED_LEN {
11623            payload_buf[0..avail_len].copy_from_slice(__input);
11624            Bytes::new(&payload_buf)
11625        } else {
11626            Bytes::new(__input)
11627        };
11628        let mut __struct = Self::default();
11629        __struct.mcc = buf.get_u16_le()?;
11630        __struct.mnc = buf.get_u16_le()?;
11631        __struct.lac = buf.get_u16_le()?;
11632        let tmp = buf.get_u8()?;
11633        __struct.status =
11634            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11635                enum_type: "CellularStatusFlag",
11636                value: tmp as u64,
11637            })?;
11638        let tmp = buf.get_u8()?;
11639        __struct.failure_reason =
11640            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11641                enum_type: "CellularNetworkFailedReason",
11642                value: tmp as u64,
11643            })?;
11644        let tmp = buf.get_u8()?;
11645        __struct.mavtype =
11646            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11647                enum_type: "CellularNetworkRadioType",
11648                value: tmp as u64,
11649            })?;
11650        __struct.quality = buf.get_u8()?;
11651        Ok(__struct)
11652    }
11653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11654        let mut __tmp = BytesMut::new(bytes);
11655        #[allow(clippy::absurd_extreme_comparisons)]
11656        #[allow(unused_comparisons)]
11657        if __tmp.remaining() < Self::ENCODED_LEN {
11658            panic!(
11659                "buffer is too small (need {} bytes, but got {})",
11660                Self::ENCODED_LEN,
11661                __tmp.remaining(),
11662            )
11663        }
11664        __tmp.put_u16_le(self.mcc);
11665        __tmp.put_u16_le(self.mnc);
11666        __tmp.put_u16_le(self.lac);
11667        __tmp.put_u8(self.status as u8);
11668        __tmp.put_u8(self.failure_reason as u8);
11669        __tmp.put_u8(self.mavtype as u8);
11670        __tmp.put_u8(self.quality);
11671        if matches!(version, MavlinkVersion::V2) {
11672            let len = __tmp.len();
11673            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11674        } else {
11675            __tmp.len()
11676        }
11677    }
11678}
11679#[doc = "Request to control this MAV."]
11680#[doc = ""]
11681#[doc = "ID: 5"]
11682#[derive(Debug, Clone, PartialEq)]
11683#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11685#[cfg_attr(feature = "ts", derive(TS))]
11686#[cfg_attr(feature = "ts", ts(export))]
11687pub struct CHANGE_OPERATOR_CONTROL_DATA {
11688    #[doc = "System the GCS requests control for"]
11689    pub target_system: u8,
11690    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
11691    pub control_request: u8,
11692    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
11693    pub version: u8,
11694    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
11695    #[cfg_attr(feature = "ts", ts(type = "string"))]
11696    pub passkey: CharArray<25>,
11697}
11698impl CHANGE_OPERATOR_CONTROL_DATA {
11699    pub const ENCODED_LEN: usize = 28usize;
11700    pub const DEFAULT: Self = Self {
11701        target_system: 0_u8,
11702        control_request: 0_u8,
11703        version: 0_u8,
11704        passkey: CharArray::new([0_u8; 25usize]),
11705    };
11706    #[cfg(feature = "arbitrary")]
11707    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11708        use arbitrary::{Arbitrary, Unstructured};
11709        let mut buf = [0u8; 1024];
11710        rng.fill_bytes(&mut buf);
11711        let mut unstructured = Unstructured::new(&buf);
11712        Self::arbitrary(&mut unstructured).unwrap_or_default()
11713    }
11714}
11715impl Default for CHANGE_OPERATOR_CONTROL_DATA {
11716    fn default() -> Self {
11717        Self::DEFAULT.clone()
11718    }
11719}
11720impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
11721    type Message = MavMessage;
11722    const ID: u32 = 5u32;
11723    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
11724    const EXTRA_CRC: u8 = 217u8;
11725    const ENCODED_LEN: usize = 28usize;
11726    fn deser(
11727        _version: MavlinkVersion,
11728        __input: &[u8],
11729    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11730        let avail_len = __input.len();
11731        let mut payload_buf = [0; Self::ENCODED_LEN];
11732        let mut buf = if avail_len < Self::ENCODED_LEN {
11733            payload_buf[0..avail_len].copy_from_slice(__input);
11734            Bytes::new(&payload_buf)
11735        } else {
11736            Bytes::new(__input)
11737        };
11738        let mut __struct = Self::default();
11739        __struct.target_system = buf.get_u8()?;
11740        __struct.control_request = buf.get_u8()?;
11741        __struct.version = buf.get_u8()?;
11742        let mut tmp = [0_u8; 25usize];
11743        for v in &mut tmp {
11744            *v = buf.get_u8()?;
11745        }
11746        __struct.passkey = CharArray::new(tmp);
11747        Ok(__struct)
11748    }
11749    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11750        let mut __tmp = BytesMut::new(bytes);
11751        #[allow(clippy::absurd_extreme_comparisons)]
11752        #[allow(unused_comparisons)]
11753        if __tmp.remaining() < Self::ENCODED_LEN {
11754            panic!(
11755                "buffer is too small (need {} bytes, but got {})",
11756                Self::ENCODED_LEN,
11757                __tmp.remaining(),
11758            )
11759        }
11760        __tmp.put_u8(self.target_system);
11761        __tmp.put_u8(self.control_request);
11762        __tmp.put_u8(self.version);
11763        for val in &self.passkey {
11764            __tmp.put_u8(*val);
11765        }
11766        if matches!(version, MavlinkVersion::V2) {
11767            let len = __tmp.len();
11768            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11769        } else {
11770            __tmp.len()
11771        }
11772    }
11773}
11774#[doc = "Accept / deny control of this MAV."]
11775#[doc = ""]
11776#[doc = "ID: 6"]
11777#[derive(Debug, Clone, PartialEq)]
11778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11780#[cfg_attr(feature = "ts", derive(TS))]
11781#[cfg_attr(feature = "ts", ts(export))]
11782pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
11783    #[doc = "ID of the GCS this message"]
11784    pub gcs_system_id: u8,
11785    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
11786    pub control_request: u8,
11787    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
11788    pub ack: u8,
11789}
11790impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
11791    pub const ENCODED_LEN: usize = 3usize;
11792    pub const DEFAULT: Self = Self {
11793        gcs_system_id: 0_u8,
11794        control_request: 0_u8,
11795        ack: 0_u8,
11796    };
11797    #[cfg(feature = "arbitrary")]
11798    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11799        use arbitrary::{Arbitrary, Unstructured};
11800        let mut buf = [0u8; 1024];
11801        rng.fill_bytes(&mut buf);
11802        let mut unstructured = Unstructured::new(&buf);
11803        Self::arbitrary(&mut unstructured).unwrap_or_default()
11804    }
11805}
11806impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
11807    fn default() -> Self {
11808        Self::DEFAULT.clone()
11809    }
11810}
11811impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
11812    type Message = MavMessage;
11813    const ID: u32 = 6u32;
11814    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
11815    const EXTRA_CRC: u8 = 104u8;
11816    const ENCODED_LEN: usize = 3usize;
11817    fn deser(
11818        _version: MavlinkVersion,
11819        __input: &[u8],
11820    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11821        let avail_len = __input.len();
11822        let mut payload_buf = [0; Self::ENCODED_LEN];
11823        let mut buf = if avail_len < Self::ENCODED_LEN {
11824            payload_buf[0..avail_len].copy_from_slice(__input);
11825            Bytes::new(&payload_buf)
11826        } else {
11827            Bytes::new(__input)
11828        };
11829        let mut __struct = Self::default();
11830        __struct.gcs_system_id = buf.get_u8()?;
11831        __struct.control_request = buf.get_u8()?;
11832        __struct.ack = buf.get_u8()?;
11833        Ok(__struct)
11834    }
11835    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11836        let mut __tmp = BytesMut::new(bytes);
11837        #[allow(clippy::absurd_extreme_comparisons)]
11838        #[allow(unused_comparisons)]
11839        if __tmp.remaining() < Self::ENCODED_LEN {
11840            panic!(
11841                "buffer is too small (need {} bytes, but got {})",
11842                Self::ENCODED_LEN,
11843                __tmp.remaining(),
11844            )
11845        }
11846        __tmp.put_u8(self.gcs_system_id);
11847        __tmp.put_u8(self.control_request);
11848        __tmp.put_u8(self.ack);
11849        if matches!(version, MavlinkVersion::V2) {
11850            let len = __tmp.len();
11851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11852        } else {
11853            __tmp.len()
11854        }
11855    }
11856}
11857#[doc = "Information about a potential collision."]
11858#[doc = ""]
11859#[doc = "ID: 247"]
11860#[derive(Debug, Clone, PartialEq)]
11861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11863#[cfg_attr(feature = "ts", derive(TS))]
11864#[cfg_attr(feature = "ts", ts(export))]
11865pub struct COLLISION_DATA {
11866    #[doc = "Unique identifier, domain based on src field"]
11867    pub id: u32,
11868    #[doc = "Estimated time until collision occurs"]
11869    pub time_to_minimum_delta: f32,
11870    #[doc = "Closest vertical distance between vehicle and object"]
11871    pub altitude_minimum_delta: f32,
11872    #[doc = "Closest horizontal distance between vehicle and object"]
11873    pub horizontal_minimum_delta: f32,
11874    #[doc = "Collision data source"]
11875    pub src: MavCollisionSrc,
11876    #[doc = "Action that is being taken to avoid this collision"]
11877    pub action: MavCollisionAction,
11878    #[doc = "How concerned the aircraft is about this collision"]
11879    pub threat_level: MavCollisionThreatLevel,
11880}
11881impl COLLISION_DATA {
11882    pub const ENCODED_LEN: usize = 19usize;
11883    pub const DEFAULT: Self = Self {
11884        id: 0_u32,
11885        time_to_minimum_delta: 0.0_f32,
11886        altitude_minimum_delta: 0.0_f32,
11887        horizontal_minimum_delta: 0.0_f32,
11888        src: MavCollisionSrc::DEFAULT,
11889        action: MavCollisionAction::DEFAULT,
11890        threat_level: MavCollisionThreatLevel::DEFAULT,
11891    };
11892    #[cfg(feature = "arbitrary")]
11893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11894        use arbitrary::{Arbitrary, Unstructured};
11895        let mut buf = [0u8; 1024];
11896        rng.fill_bytes(&mut buf);
11897        let mut unstructured = Unstructured::new(&buf);
11898        Self::arbitrary(&mut unstructured).unwrap_or_default()
11899    }
11900}
11901impl Default for COLLISION_DATA {
11902    fn default() -> Self {
11903        Self::DEFAULT.clone()
11904    }
11905}
11906impl MessageData for COLLISION_DATA {
11907    type Message = MavMessage;
11908    const ID: u32 = 247u32;
11909    const NAME: &'static str = "COLLISION";
11910    const EXTRA_CRC: u8 = 81u8;
11911    const ENCODED_LEN: usize = 19usize;
11912    fn deser(
11913        _version: MavlinkVersion,
11914        __input: &[u8],
11915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11916        let avail_len = __input.len();
11917        let mut payload_buf = [0; Self::ENCODED_LEN];
11918        let mut buf = if avail_len < Self::ENCODED_LEN {
11919            payload_buf[0..avail_len].copy_from_slice(__input);
11920            Bytes::new(&payload_buf)
11921        } else {
11922            Bytes::new(__input)
11923        };
11924        let mut __struct = Self::default();
11925        __struct.id = buf.get_u32_le()?;
11926        __struct.time_to_minimum_delta = buf.get_f32_le()?;
11927        __struct.altitude_minimum_delta = buf.get_f32_le()?;
11928        __struct.horizontal_minimum_delta = buf.get_f32_le()?;
11929        let tmp = buf.get_u8()?;
11930        __struct.src =
11931            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11932                enum_type: "MavCollisionSrc",
11933                value: tmp as u64,
11934            })?;
11935        let tmp = buf.get_u8()?;
11936        __struct.action =
11937            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11938                enum_type: "MavCollisionAction",
11939                value: tmp as u64,
11940            })?;
11941        let tmp = buf.get_u8()?;
11942        __struct.threat_level =
11943            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11944                enum_type: "MavCollisionThreatLevel",
11945                value: tmp as u64,
11946            })?;
11947        Ok(__struct)
11948    }
11949    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11950        let mut __tmp = BytesMut::new(bytes);
11951        #[allow(clippy::absurd_extreme_comparisons)]
11952        #[allow(unused_comparisons)]
11953        if __tmp.remaining() < Self::ENCODED_LEN {
11954            panic!(
11955                "buffer is too small (need {} bytes, but got {})",
11956                Self::ENCODED_LEN,
11957                __tmp.remaining(),
11958            )
11959        }
11960        __tmp.put_u32_le(self.id);
11961        __tmp.put_f32_le(self.time_to_minimum_delta);
11962        __tmp.put_f32_le(self.altitude_minimum_delta);
11963        __tmp.put_f32_le(self.horizontal_minimum_delta);
11964        __tmp.put_u8(self.src as u8);
11965        __tmp.put_u8(self.action as u8);
11966        __tmp.put_u8(self.threat_level as u8);
11967        if matches!(version, MavlinkVersion::V2) {
11968            let len = __tmp.len();
11969            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11970        } else {
11971            __tmp.len()
11972        }
11973    }
11974}
11975#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
11976#[doc = ""]
11977#[doc = "ID: 77"]
11978#[derive(Debug, Clone, PartialEq)]
11979#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11980#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11981#[cfg_attr(feature = "ts", derive(TS))]
11982#[cfg_attr(feature = "ts", ts(export))]
11983pub struct COMMAND_ACK_DATA {
11984    #[doc = "Command ID (of acknowledged command)."]
11985    pub command: MavCmd,
11986    #[doc = "Result of command."]
11987    pub result: MavResult,
11988    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
11989    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11990    pub progress: u8,
11991    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
11992    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11993    pub result_param2: i32,
11994    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
11995    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11996    pub target_system: u8,
11997    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
11998    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11999    pub target_component: u8,
12000}
12001impl COMMAND_ACK_DATA {
12002    pub const ENCODED_LEN: usize = 10usize;
12003    pub const DEFAULT: Self = Self {
12004        command: MavCmd::DEFAULT,
12005        result: MavResult::DEFAULT,
12006        progress: 0_u8,
12007        result_param2: 0_i32,
12008        target_system: 0_u8,
12009        target_component: 0_u8,
12010    };
12011    #[cfg(feature = "arbitrary")]
12012    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12013        use arbitrary::{Arbitrary, Unstructured};
12014        let mut buf = [0u8; 1024];
12015        rng.fill_bytes(&mut buf);
12016        let mut unstructured = Unstructured::new(&buf);
12017        Self::arbitrary(&mut unstructured).unwrap_or_default()
12018    }
12019}
12020impl Default for COMMAND_ACK_DATA {
12021    fn default() -> Self {
12022        Self::DEFAULT.clone()
12023    }
12024}
12025impl MessageData for COMMAND_ACK_DATA {
12026    type Message = MavMessage;
12027    const ID: u32 = 77u32;
12028    const NAME: &'static str = "COMMAND_ACK";
12029    const EXTRA_CRC: u8 = 143u8;
12030    const ENCODED_LEN: usize = 10usize;
12031    fn deser(
12032        _version: MavlinkVersion,
12033        __input: &[u8],
12034    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12035        let avail_len = __input.len();
12036        let mut payload_buf = [0; Self::ENCODED_LEN];
12037        let mut buf = if avail_len < Self::ENCODED_LEN {
12038            payload_buf[0..avail_len].copy_from_slice(__input);
12039            Bytes::new(&payload_buf)
12040        } else {
12041            Bytes::new(__input)
12042        };
12043        let mut __struct = Self::default();
12044        let tmp = buf.get_u16_le()?;
12045        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
12046            ::mavlink_core::error::ParserError::InvalidEnum {
12047                enum_type: "MavCmd",
12048                value: tmp as u64,
12049            },
12050        )?;
12051        let tmp = buf.get_u8()?;
12052        __struct.result =
12053            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12054                enum_type: "MavResult",
12055                value: tmp as u64,
12056            })?;
12057        __struct.progress = buf.get_u8()?;
12058        __struct.result_param2 = buf.get_i32_le()?;
12059        __struct.target_system = buf.get_u8()?;
12060        __struct.target_component = buf.get_u8()?;
12061        Ok(__struct)
12062    }
12063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12064        let mut __tmp = BytesMut::new(bytes);
12065        #[allow(clippy::absurd_extreme_comparisons)]
12066        #[allow(unused_comparisons)]
12067        if __tmp.remaining() < Self::ENCODED_LEN {
12068            panic!(
12069                "buffer is too small (need {} bytes, but got {})",
12070                Self::ENCODED_LEN,
12071                __tmp.remaining(),
12072            )
12073        }
12074        __tmp.put_u16_le(self.command as u16);
12075        __tmp.put_u8(self.result as u8);
12076        if matches!(version, MavlinkVersion::V2) {
12077            __tmp.put_u8(self.progress);
12078            __tmp.put_i32_le(self.result_param2);
12079            __tmp.put_u8(self.target_system);
12080            __tmp.put_u8(self.target_component);
12081            let len = __tmp.len();
12082            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12083        } else {
12084            __tmp.len()
12085        }
12086    }
12087}
12088#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
12089#[doc = ""]
12090#[doc = "ID: 80"]
12091#[derive(Debug, Clone, PartialEq)]
12092#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12093#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12094#[cfg_attr(feature = "ts", derive(TS))]
12095#[cfg_attr(feature = "ts", ts(export))]
12096pub struct COMMAND_CANCEL_DATA {
12097    #[doc = "Command ID (of command to cancel)."]
12098    pub command: MavCmd,
12099    #[doc = "System executing long running command. Should not be broadcast (0)."]
12100    pub target_system: u8,
12101    #[doc = "Component executing long running command."]
12102    pub target_component: u8,
12103}
12104impl COMMAND_CANCEL_DATA {
12105    pub const ENCODED_LEN: usize = 4usize;
12106    pub const DEFAULT: Self = Self {
12107        command: MavCmd::DEFAULT,
12108        target_system: 0_u8,
12109        target_component: 0_u8,
12110    };
12111    #[cfg(feature = "arbitrary")]
12112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12113        use arbitrary::{Arbitrary, Unstructured};
12114        let mut buf = [0u8; 1024];
12115        rng.fill_bytes(&mut buf);
12116        let mut unstructured = Unstructured::new(&buf);
12117        Self::arbitrary(&mut unstructured).unwrap_or_default()
12118    }
12119}
12120impl Default for COMMAND_CANCEL_DATA {
12121    fn default() -> Self {
12122        Self::DEFAULT.clone()
12123    }
12124}
12125impl MessageData for COMMAND_CANCEL_DATA {
12126    type Message = MavMessage;
12127    const ID: u32 = 80u32;
12128    const NAME: &'static str = "COMMAND_CANCEL";
12129    const EXTRA_CRC: u8 = 14u8;
12130    const ENCODED_LEN: usize = 4usize;
12131    fn deser(
12132        _version: MavlinkVersion,
12133        __input: &[u8],
12134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12135        let avail_len = __input.len();
12136        let mut payload_buf = [0; Self::ENCODED_LEN];
12137        let mut buf = if avail_len < Self::ENCODED_LEN {
12138            payload_buf[0..avail_len].copy_from_slice(__input);
12139            Bytes::new(&payload_buf)
12140        } else {
12141            Bytes::new(__input)
12142        };
12143        let mut __struct = Self::default();
12144        let tmp = buf.get_u16_le()?;
12145        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
12146            ::mavlink_core::error::ParserError::InvalidEnum {
12147                enum_type: "MavCmd",
12148                value: tmp as u64,
12149            },
12150        )?;
12151        __struct.target_system = buf.get_u8()?;
12152        __struct.target_component = buf.get_u8()?;
12153        Ok(__struct)
12154    }
12155    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12156        let mut __tmp = BytesMut::new(bytes);
12157        #[allow(clippy::absurd_extreme_comparisons)]
12158        #[allow(unused_comparisons)]
12159        if __tmp.remaining() < Self::ENCODED_LEN {
12160            panic!(
12161                "buffer is too small (need {} bytes, but got {})",
12162                Self::ENCODED_LEN,
12163                __tmp.remaining(),
12164            )
12165        }
12166        __tmp.put_u16_le(self.command as u16);
12167        __tmp.put_u8(self.target_system);
12168        __tmp.put_u8(self.target_component);
12169        if matches!(version, MavlinkVersion::V2) {
12170            let len = __tmp.len();
12171            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12172        } else {
12173            __tmp.len()
12174        }
12175    }
12176}
12177#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
12178#[doc = ""]
12179#[doc = "ID: 75"]
12180#[derive(Debug, Clone, PartialEq)]
12181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12183#[cfg_attr(feature = "ts", derive(TS))]
12184#[cfg_attr(feature = "ts", ts(export))]
12185pub struct COMMAND_INT_DATA {
12186    #[doc = "PARAM1, see MAV_CMD enum"]
12187    pub param1: f32,
12188    #[doc = "PARAM2, see MAV_CMD enum"]
12189    pub param2: f32,
12190    #[doc = "PARAM3, see MAV_CMD enum"]
12191    pub param3: f32,
12192    #[doc = "PARAM4, see MAV_CMD enum"]
12193    pub param4: f32,
12194    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
12195    pub x: i32,
12196    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
12197    pub y: i32,
12198    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
12199    pub z: f32,
12200    #[doc = "The scheduled action for the mission item."]
12201    pub command: MavCmd,
12202    #[doc = "System ID"]
12203    pub target_system: u8,
12204    #[doc = "Component ID"]
12205    pub target_component: u8,
12206    #[doc = "The coordinate system of the COMMAND."]
12207    pub frame: MavFrame,
12208    #[doc = "Not used."]
12209    pub current: u8,
12210    #[doc = "Not used (set 0)."]
12211    pub autocontinue: u8,
12212}
12213impl COMMAND_INT_DATA {
12214    pub const ENCODED_LEN: usize = 35usize;
12215    pub const DEFAULT: Self = Self {
12216        param1: 0.0_f32,
12217        param2: 0.0_f32,
12218        param3: 0.0_f32,
12219        param4: 0.0_f32,
12220        x: 0_i32,
12221        y: 0_i32,
12222        z: 0.0_f32,
12223        command: MavCmd::DEFAULT,
12224        target_system: 0_u8,
12225        target_component: 0_u8,
12226        frame: MavFrame::DEFAULT,
12227        current: 0_u8,
12228        autocontinue: 0_u8,
12229    };
12230    #[cfg(feature = "arbitrary")]
12231    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12232        use arbitrary::{Arbitrary, Unstructured};
12233        let mut buf = [0u8; 1024];
12234        rng.fill_bytes(&mut buf);
12235        let mut unstructured = Unstructured::new(&buf);
12236        Self::arbitrary(&mut unstructured).unwrap_or_default()
12237    }
12238}
12239impl Default for COMMAND_INT_DATA {
12240    fn default() -> Self {
12241        Self::DEFAULT.clone()
12242    }
12243}
12244impl MessageData for COMMAND_INT_DATA {
12245    type Message = MavMessage;
12246    const ID: u32 = 75u32;
12247    const NAME: &'static str = "COMMAND_INT";
12248    const EXTRA_CRC: u8 = 158u8;
12249    const ENCODED_LEN: usize = 35usize;
12250    fn deser(
12251        _version: MavlinkVersion,
12252        __input: &[u8],
12253    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12254        let avail_len = __input.len();
12255        let mut payload_buf = [0; Self::ENCODED_LEN];
12256        let mut buf = if avail_len < Self::ENCODED_LEN {
12257            payload_buf[0..avail_len].copy_from_slice(__input);
12258            Bytes::new(&payload_buf)
12259        } else {
12260            Bytes::new(__input)
12261        };
12262        let mut __struct = Self::default();
12263        __struct.param1 = buf.get_f32_le()?;
12264        __struct.param2 = buf.get_f32_le()?;
12265        __struct.param3 = buf.get_f32_le()?;
12266        __struct.param4 = buf.get_f32_le()?;
12267        __struct.x = buf.get_i32_le()?;
12268        __struct.y = buf.get_i32_le()?;
12269        __struct.z = buf.get_f32_le()?;
12270        let tmp = buf.get_u16_le()?;
12271        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
12272            ::mavlink_core::error::ParserError::InvalidEnum {
12273                enum_type: "MavCmd",
12274                value: tmp as u64,
12275            },
12276        )?;
12277        __struct.target_system = buf.get_u8()?;
12278        __struct.target_component = buf.get_u8()?;
12279        let tmp = buf.get_u8()?;
12280        __struct.frame =
12281            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12282                enum_type: "MavFrame",
12283                value: tmp as u64,
12284            })?;
12285        __struct.current = buf.get_u8()?;
12286        __struct.autocontinue = buf.get_u8()?;
12287        Ok(__struct)
12288    }
12289    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12290        let mut __tmp = BytesMut::new(bytes);
12291        #[allow(clippy::absurd_extreme_comparisons)]
12292        #[allow(unused_comparisons)]
12293        if __tmp.remaining() < Self::ENCODED_LEN {
12294            panic!(
12295                "buffer is too small (need {} bytes, but got {})",
12296                Self::ENCODED_LEN,
12297                __tmp.remaining(),
12298            )
12299        }
12300        __tmp.put_f32_le(self.param1);
12301        __tmp.put_f32_le(self.param2);
12302        __tmp.put_f32_le(self.param3);
12303        __tmp.put_f32_le(self.param4);
12304        __tmp.put_i32_le(self.x);
12305        __tmp.put_i32_le(self.y);
12306        __tmp.put_f32_le(self.z);
12307        __tmp.put_u16_le(self.command as u16);
12308        __tmp.put_u8(self.target_system);
12309        __tmp.put_u8(self.target_component);
12310        __tmp.put_u8(self.frame as u8);
12311        __tmp.put_u8(self.current);
12312        __tmp.put_u8(self.autocontinue);
12313        if matches!(version, MavlinkVersion::V2) {
12314            let len = __tmp.len();
12315            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12316        } else {
12317            __tmp.len()
12318        }
12319    }
12320}
12321#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
12322#[doc = ""]
12323#[doc = "ID: 76"]
12324#[derive(Debug, Clone, PartialEq)]
12325#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12326#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12327#[cfg_attr(feature = "ts", derive(TS))]
12328#[cfg_attr(feature = "ts", ts(export))]
12329pub struct COMMAND_LONG_DATA {
12330    #[doc = "Parameter 1 (for the specific command)."]
12331    pub param1: f32,
12332    #[doc = "Parameter 2 (for the specific command)."]
12333    pub param2: f32,
12334    #[doc = "Parameter 3 (for the specific command)."]
12335    pub param3: f32,
12336    #[doc = "Parameter 4 (for the specific command)."]
12337    pub param4: f32,
12338    #[doc = "Parameter 5 (for the specific command)."]
12339    pub param5: f32,
12340    #[doc = "Parameter 6 (for the specific command)."]
12341    pub param6: f32,
12342    #[doc = "Parameter 7 (for the specific command)."]
12343    pub param7: f32,
12344    #[doc = "Command ID (of command to send)."]
12345    pub command: MavCmd,
12346    #[doc = "System which should execute the command"]
12347    pub target_system: u8,
12348    #[doc = "Component which should execute the command, 0 for all components"]
12349    pub target_component: u8,
12350    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
12351    pub confirmation: u8,
12352}
12353impl COMMAND_LONG_DATA {
12354    pub const ENCODED_LEN: usize = 33usize;
12355    pub const DEFAULT: Self = Self {
12356        param1: 0.0_f32,
12357        param2: 0.0_f32,
12358        param3: 0.0_f32,
12359        param4: 0.0_f32,
12360        param5: 0.0_f32,
12361        param6: 0.0_f32,
12362        param7: 0.0_f32,
12363        command: MavCmd::DEFAULT,
12364        target_system: 0_u8,
12365        target_component: 0_u8,
12366        confirmation: 0_u8,
12367    };
12368    #[cfg(feature = "arbitrary")]
12369    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12370        use arbitrary::{Arbitrary, Unstructured};
12371        let mut buf = [0u8; 1024];
12372        rng.fill_bytes(&mut buf);
12373        let mut unstructured = Unstructured::new(&buf);
12374        Self::arbitrary(&mut unstructured).unwrap_or_default()
12375    }
12376}
12377impl Default for COMMAND_LONG_DATA {
12378    fn default() -> Self {
12379        Self::DEFAULT.clone()
12380    }
12381}
12382impl MessageData for COMMAND_LONG_DATA {
12383    type Message = MavMessage;
12384    const ID: u32 = 76u32;
12385    const NAME: &'static str = "COMMAND_LONG";
12386    const EXTRA_CRC: u8 = 152u8;
12387    const ENCODED_LEN: usize = 33usize;
12388    fn deser(
12389        _version: MavlinkVersion,
12390        __input: &[u8],
12391    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12392        let avail_len = __input.len();
12393        let mut payload_buf = [0; Self::ENCODED_LEN];
12394        let mut buf = if avail_len < Self::ENCODED_LEN {
12395            payload_buf[0..avail_len].copy_from_slice(__input);
12396            Bytes::new(&payload_buf)
12397        } else {
12398            Bytes::new(__input)
12399        };
12400        let mut __struct = Self::default();
12401        __struct.param1 = buf.get_f32_le()?;
12402        __struct.param2 = buf.get_f32_le()?;
12403        __struct.param3 = buf.get_f32_le()?;
12404        __struct.param4 = buf.get_f32_le()?;
12405        __struct.param5 = buf.get_f32_le()?;
12406        __struct.param6 = buf.get_f32_le()?;
12407        __struct.param7 = buf.get_f32_le()?;
12408        let tmp = buf.get_u16_le()?;
12409        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
12410            ::mavlink_core::error::ParserError::InvalidEnum {
12411                enum_type: "MavCmd",
12412                value: tmp as u64,
12413            },
12414        )?;
12415        __struct.target_system = buf.get_u8()?;
12416        __struct.target_component = buf.get_u8()?;
12417        __struct.confirmation = buf.get_u8()?;
12418        Ok(__struct)
12419    }
12420    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12421        let mut __tmp = BytesMut::new(bytes);
12422        #[allow(clippy::absurd_extreme_comparisons)]
12423        #[allow(unused_comparisons)]
12424        if __tmp.remaining() < Self::ENCODED_LEN {
12425            panic!(
12426                "buffer is too small (need {} bytes, but got {})",
12427                Self::ENCODED_LEN,
12428                __tmp.remaining(),
12429            )
12430        }
12431        __tmp.put_f32_le(self.param1);
12432        __tmp.put_f32_le(self.param2);
12433        __tmp.put_f32_le(self.param3);
12434        __tmp.put_f32_le(self.param4);
12435        __tmp.put_f32_le(self.param5);
12436        __tmp.put_f32_le(self.param6);
12437        __tmp.put_f32_le(self.param7);
12438        __tmp.put_u16_le(self.command as u16);
12439        __tmp.put_u8(self.target_system);
12440        __tmp.put_u8(self.target_component);
12441        __tmp.put_u8(self.confirmation);
12442        if matches!(version, MavlinkVersion::V2) {
12443            let len = __tmp.len();
12444            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12445        } else {
12446            __tmp.len()
12447        }
12448    }
12449}
12450#[doc = "Status of compassmot calibration."]
12451#[doc = ""]
12452#[doc = "ID: 177"]
12453#[derive(Debug, Clone, PartialEq)]
12454#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12455#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12456#[cfg_attr(feature = "ts", derive(TS))]
12457#[cfg_attr(feature = "ts", ts(export))]
12458pub struct COMPASSMOT_STATUS_DATA {
12459    #[doc = "Current."]
12460    pub current: f32,
12461    #[doc = "Motor Compensation X."]
12462    pub CompensationX: f32,
12463    #[doc = "Motor Compensation Y."]
12464    pub CompensationY: f32,
12465    #[doc = "Motor Compensation Z."]
12466    pub CompensationZ: f32,
12467    #[doc = "Throttle."]
12468    pub throttle: u16,
12469    #[doc = "Interference."]
12470    pub interference: u16,
12471}
12472impl COMPASSMOT_STATUS_DATA {
12473    pub const ENCODED_LEN: usize = 20usize;
12474    pub const DEFAULT: Self = Self {
12475        current: 0.0_f32,
12476        CompensationX: 0.0_f32,
12477        CompensationY: 0.0_f32,
12478        CompensationZ: 0.0_f32,
12479        throttle: 0_u16,
12480        interference: 0_u16,
12481    };
12482    #[cfg(feature = "arbitrary")]
12483    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12484        use arbitrary::{Arbitrary, Unstructured};
12485        let mut buf = [0u8; 1024];
12486        rng.fill_bytes(&mut buf);
12487        let mut unstructured = Unstructured::new(&buf);
12488        Self::arbitrary(&mut unstructured).unwrap_or_default()
12489    }
12490}
12491impl Default for COMPASSMOT_STATUS_DATA {
12492    fn default() -> Self {
12493        Self::DEFAULT.clone()
12494    }
12495}
12496impl MessageData for COMPASSMOT_STATUS_DATA {
12497    type Message = MavMessage;
12498    const ID: u32 = 177u32;
12499    const NAME: &'static str = "COMPASSMOT_STATUS";
12500    const EXTRA_CRC: u8 = 240u8;
12501    const ENCODED_LEN: usize = 20usize;
12502    fn deser(
12503        _version: MavlinkVersion,
12504        __input: &[u8],
12505    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12506        let avail_len = __input.len();
12507        let mut payload_buf = [0; Self::ENCODED_LEN];
12508        let mut buf = if avail_len < Self::ENCODED_LEN {
12509            payload_buf[0..avail_len].copy_from_slice(__input);
12510            Bytes::new(&payload_buf)
12511        } else {
12512            Bytes::new(__input)
12513        };
12514        let mut __struct = Self::default();
12515        __struct.current = buf.get_f32_le()?;
12516        __struct.CompensationX = buf.get_f32_le()?;
12517        __struct.CompensationY = buf.get_f32_le()?;
12518        __struct.CompensationZ = buf.get_f32_le()?;
12519        __struct.throttle = buf.get_u16_le()?;
12520        __struct.interference = buf.get_u16_le()?;
12521        Ok(__struct)
12522    }
12523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12524        let mut __tmp = BytesMut::new(bytes);
12525        #[allow(clippy::absurd_extreme_comparisons)]
12526        #[allow(unused_comparisons)]
12527        if __tmp.remaining() < Self::ENCODED_LEN {
12528            panic!(
12529                "buffer is too small (need {} bytes, but got {})",
12530                Self::ENCODED_LEN,
12531                __tmp.remaining(),
12532            )
12533        }
12534        __tmp.put_f32_le(self.current);
12535        __tmp.put_f32_le(self.CompensationX);
12536        __tmp.put_f32_le(self.CompensationY);
12537        __tmp.put_f32_le(self.CompensationZ);
12538        __tmp.put_u16_le(self.throttle);
12539        __tmp.put_u16_le(self.interference);
12540        if matches!(version, MavlinkVersion::V2) {
12541            let len = __tmp.len();
12542            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12543        } else {
12544            __tmp.len()
12545        }
12546    }
12547}
12548#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
12549#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
12550#[doc = ""]
12551#[doc = "ID: 395"]
12552#[derive(Debug, Clone, PartialEq)]
12553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12555#[cfg_attr(feature = "ts", derive(TS))]
12556#[cfg_attr(feature = "ts", ts(export))]
12557pub struct COMPONENT_INFORMATION_DATA {
12558    #[doc = "Timestamp (time since system boot)."]
12559    pub time_boot_ms: u32,
12560    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
12561    pub general_metadata_file_crc: u32,
12562    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
12563    pub peripherals_metadata_file_crc: u32,
12564    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
12565    #[cfg_attr(feature = "ts", ts(type = "string"))]
12566    pub general_metadata_uri: CharArray<100>,
12567    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
12568    #[cfg_attr(feature = "ts", ts(type = "string"))]
12569    pub peripherals_metadata_uri: CharArray<100>,
12570}
12571impl COMPONENT_INFORMATION_DATA {
12572    pub const ENCODED_LEN: usize = 212usize;
12573    pub const DEFAULT: Self = Self {
12574        time_boot_ms: 0_u32,
12575        general_metadata_file_crc: 0_u32,
12576        peripherals_metadata_file_crc: 0_u32,
12577        general_metadata_uri: CharArray::new([0_u8; 100usize]),
12578        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
12579    };
12580    #[cfg(feature = "arbitrary")]
12581    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12582        use arbitrary::{Arbitrary, Unstructured};
12583        let mut buf = [0u8; 1024];
12584        rng.fill_bytes(&mut buf);
12585        let mut unstructured = Unstructured::new(&buf);
12586        Self::arbitrary(&mut unstructured).unwrap_or_default()
12587    }
12588}
12589impl Default for COMPONENT_INFORMATION_DATA {
12590    fn default() -> Self {
12591        Self::DEFAULT.clone()
12592    }
12593}
12594impl MessageData for COMPONENT_INFORMATION_DATA {
12595    type Message = MavMessage;
12596    const ID: u32 = 395u32;
12597    const NAME: &'static str = "COMPONENT_INFORMATION";
12598    const EXTRA_CRC: u8 = 0u8;
12599    const ENCODED_LEN: usize = 212usize;
12600    fn deser(
12601        _version: MavlinkVersion,
12602        __input: &[u8],
12603    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12604        let avail_len = __input.len();
12605        let mut payload_buf = [0; Self::ENCODED_LEN];
12606        let mut buf = if avail_len < Self::ENCODED_LEN {
12607            payload_buf[0..avail_len].copy_from_slice(__input);
12608            Bytes::new(&payload_buf)
12609        } else {
12610            Bytes::new(__input)
12611        };
12612        let mut __struct = Self::default();
12613        __struct.time_boot_ms = buf.get_u32_le()?;
12614        __struct.general_metadata_file_crc = buf.get_u32_le()?;
12615        __struct.peripherals_metadata_file_crc = buf.get_u32_le()?;
12616        let mut tmp = [0_u8; 100usize];
12617        for v in &mut tmp {
12618            *v = buf.get_u8()?;
12619        }
12620        __struct.general_metadata_uri = CharArray::new(tmp);
12621        let mut tmp = [0_u8; 100usize];
12622        for v in &mut tmp {
12623            *v = buf.get_u8()?;
12624        }
12625        __struct.peripherals_metadata_uri = CharArray::new(tmp);
12626        Ok(__struct)
12627    }
12628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12629        let mut __tmp = BytesMut::new(bytes);
12630        #[allow(clippy::absurd_extreme_comparisons)]
12631        #[allow(unused_comparisons)]
12632        if __tmp.remaining() < Self::ENCODED_LEN {
12633            panic!(
12634                "buffer is too small (need {} bytes, but got {})",
12635                Self::ENCODED_LEN,
12636                __tmp.remaining(),
12637            )
12638        }
12639        __tmp.put_u32_le(self.time_boot_ms);
12640        __tmp.put_u32_le(self.general_metadata_file_crc);
12641        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
12642        for val in &self.general_metadata_uri {
12643            __tmp.put_u8(*val);
12644        }
12645        for val in &self.peripherals_metadata_uri {
12646            __tmp.put_u8(*val);
12647        }
12648        if matches!(version, MavlinkVersion::V2) {
12649            let len = __tmp.len();
12650            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12651        } else {
12652            __tmp.len()
12653        }
12654    }
12655}
12656#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
12657#[doc = ""]
12658#[doc = "ID: 396"]
12659#[derive(Debug, Clone, PartialEq)]
12660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12661#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12662#[cfg_attr(feature = "ts", derive(TS))]
12663#[cfg_attr(feature = "ts", ts(export))]
12664pub struct COMPONENT_INFORMATION_BASIC_DATA {
12665    #[doc = "Component capability flags"]
12666    pub capabilities: MavProtocolCapability,
12667    #[doc = "Timestamp (time since system boot)."]
12668    pub time_boot_ms: u32,
12669    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
12670    pub time_manufacture_s: u32,
12671    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
12672    #[cfg_attr(feature = "ts", ts(type = "string"))]
12673    pub vendor_name: CharArray<32>,
12674    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
12675    #[cfg_attr(feature = "ts", ts(type = "string"))]
12676    pub model_name: CharArray<32>,
12677    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
12678    #[cfg_attr(feature = "ts", ts(type = "string"))]
12679    pub software_version: CharArray<24>,
12680    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
12681    #[cfg_attr(feature = "ts", ts(type = "string"))]
12682    pub hardware_version: CharArray<24>,
12683    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
12684    #[cfg_attr(feature = "ts", ts(type = "string"))]
12685    pub serial_number: CharArray<32>,
12686}
12687impl COMPONENT_INFORMATION_BASIC_DATA {
12688    pub const ENCODED_LEN: usize = 160usize;
12689    pub const DEFAULT: Self = Self {
12690        capabilities: MavProtocolCapability::DEFAULT,
12691        time_boot_ms: 0_u32,
12692        time_manufacture_s: 0_u32,
12693        vendor_name: CharArray::new([0_u8; 32usize]),
12694        model_name: CharArray::new([0_u8; 32usize]),
12695        software_version: CharArray::new([0_u8; 24usize]),
12696        hardware_version: CharArray::new([0_u8; 24usize]),
12697        serial_number: CharArray::new([0_u8; 32usize]),
12698    };
12699    #[cfg(feature = "arbitrary")]
12700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12701        use arbitrary::{Arbitrary, Unstructured};
12702        let mut buf = [0u8; 1024];
12703        rng.fill_bytes(&mut buf);
12704        let mut unstructured = Unstructured::new(&buf);
12705        Self::arbitrary(&mut unstructured).unwrap_or_default()
12706    }
12707}
12708impl Default for COMPONENT_INFORMATION_BASIC_DATA {
12709    fn default() -> Self {
12710        Self::DEFAULT.clone()
12711    }
12712}
12713impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
12714    type Message = MavMessage;
12715    const ID: u32 = 396u32;
12716    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
12717    const EXTRA_CRC: u8 = 50u8;
12718    const ENCODED_LEN: usize = 160usize;
12719    fn deser(
12720        _version: MavlinkVersion,
12721        __input: &[u8],
12722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12723        let avail_len = __input.len();
12724        let mut payload_buf = [0; Self::ENCODED_LEN];
12725        let mut buf = if avail_len < Self::ENCODED_LEN {
12726            payload_buf[0..avail_len].copy_from_slice(__input);
12727            Bytes::new(&payload_buf)
12728        } else {
12729            Bytes::new(__input)
12730        };
12731        let mut __struct = Self::default();
12732        let tmp = buf.get_u64_le()?;
12733        __struct.capabilities = MavProtocolCapability::from_bits(
12734            tmp as <MavProtocolCapability as Flags>::Bits,
12735        )
12736        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12737            flag_type: "MavProtocolCapability",
12738            value: tmp as u64,
12739        })?;
12740        __struct.time_boot_ms = buf.get_u32_le()?;
12741        __struct.time_manufacture_s = buf.get_u32_le()?;
12742        let mut tmp = [0_u8; 32usize];
12743        for v in &mut tmp {
12744            *v = buf.get_u8()?;
12745        }
12746        __struct.vendor_name = CharArray::new(tmp);
12747        let mut tmp = [0_u8; 32usize];
12748        for v in &mut tmp {
12749            *v = buf.get_u8()?;
12750        }
12751        __struct.model_name = CharArray::new(tmp);
12752        let mut tmp = [0_u8; 24usize];
12753        for v in &mut tmp {
12754            *v = buf.get_u8()?;
12755        }
12756        __struct.software_version = CharArray::new(tmp);
12757        let mut tmp = [0_u8; 24usize];
12758        for v in &mut tmp {
12759            *v = buf.get_u8()?;
12760        }
12761        __struct.hardware_version = CharArray::new(tmp);
12762        let mut tmp = [0_u8; 32usize];
12763        for v in &mut tmp {
12764            *v = buf.get_u8()?;
12765        }
12766        __struct.serial_number = CharArray::new(tmp);
12767        Ok(__struct)
12768    }
12769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12770        let mut __tmp = BytesMut::new(bytes);
12771        #[allow(clippy::absurd_extreme_comparisons)]
12772        #[allow(unused_comparisons)]
12773        if __tmp.remaining() < Self::ENCODED_LEN {
12774            panic!(
12775                "buffer is too small (need {} bytes, but got {})",
12776                Self::ENCODED_LEN,
12777                __tmp.remaining(),
12778            )
12779        }
12780        __tmp.put_u64_le(self.capabilities.bits() as u64);
12781        __tmp.put_u32_le(self.time_boot_ms);
12782        __tmp.put_u32_le(self.time_manufacture_s);
12783        for val in &self.vendor_name {
12784            __tmp.put_u8(*val);
12785        }
12786        for val in &self.model_name {
12787            __tmp.put_u8(*val);
12788        }
12789        for val in &self.software_version {
12790            __tmp.put_u8(*val);
12791        }
12792        for val in &self.hardware_version {
12793            __tmp.put_u8(*val);
12794        }
12795        for val in &self.serial_number {
12796            __tmp.put_u8(*val);
12797        }
12798        if matches!(version, MavlinkVersion::V2) {
12799            let len = __tmp.len();
12800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12801        } else {
12802            __tmp.len()
12803        }
12804    }
12805}
12806#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
12807#[doc = ""]
12808#[doc = "ID: 397"]
12809#[derive(Debug, Clone, PartialEq)]
12810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12812#[cfg_attr(feature = "ts", derive(TS))]
12813#[cfg_attr(feature = "ts", ts(export))]
12814pub struct COMPONENT_METADATA_DATA {
12815    #[doc = "Timestamp (time since system boot)."]
12816    pub time_boot_ms: u32,
12817    #[doc = "CRC32 of the general metadata file."]
12818    pub file_crc: u32,
12819    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
12820    #[cfg_attr(feature = "ts", ts(type = "string"))]
12821    pub uri: CharArray<100>,
12822}
12823impl COMPONENT_METADATA_DATA {
12824    pub const ENCODED_LEN: usize = 108usize;
12825    pub const DEFAULT: Self = Self {
12826        time_boot_ms: 0_u32,
12827        file_crc: 0_u32,
12828        uri: CharArray::new([0_u8; 100usize]),
12829    };
12830    #[cfg(feature = "arbitrary")]
12831    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12832        use arbitrary::{Arbitrary, Unstructured};
12833        let mut buf = [0u8; 1024];
12834        rng.fill_bytes(&mut buf);
12835        let mut unstructured = Unstructured::new(&buf);
12836        Self::arbitrary(&mut unstructured).unwrap_or_default()
12837    }
12838}
12839impl Default for COMPONENT_METADATA_DATA {
12840    fn default() -> Self {
12841        Self::DEFAULT.clone()
12842    }
12843}
12844impl MessageData for COMPONENT_METADATA_DATA {
12845    type Message = MavMessage;
12846    const ID: u32 = 397u32;
12847    const NAME: &'static str = "COMPONENT_METADATA";
12848    const EXTRA_CRC: u8 = 182u8;
12849    const ENCODED_LEN: usize = 108usize;
12850    fn deser(
12851        _version: MavlinkVersion,
12852        __input: &[u8],
12853    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12854        let avail_len = __input.len();
12855        let mut payload_buf = [0; Self::ENCODED_LEN];
12856        let mut buf = if avail_len < Self::ENCODED_LEN {
12857            payload_buf[0..avail_len].copy_from_slice(__input);
12858            Bytes::new(&payload_buf)
12859        } else {
12860            Bytes::new(__input)
12861        };
12862        let mut __struct = Self::default();
12863        __struct.time_boot_ms = buf.get_u32_le()?;
12864        __struct.file_crc = buf.get_u32_le()?;
12865        let mut tmp = [0_u8; 100usize];
12866        for v in &mut tmp {
12867            *v = buf.get_u8()?;
12868        }
12869        __struct.uri = CharArray::new(tmp);
12870        Ok(__struct)
12871    }
12872    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12873        let mut __tmp = BytesMut::new(bytes);
12874        #[allow(clippy::absurd_extreme_comparisons)]
12875        #[allow(unused_comparisons)]
12876        if __tmp.remaining() < Self::ENCODED_LEN {
12877            panic!(
12878                "buffer is too small (need {} bytes, but got {})",
12879                Self::ENCODED_LEN,
12880                __tmp.remaining(),
12881            )
12882        }
12883        __tmp.put_u32_le(self.time_boot_ms);
12884        __tmp.put_u32_le(self.file_crc);
12885        for val in &self.uri {
12886            __tmp.put_u8(*val);
12887        }
12888        if matches!(version, MavlinkVersion::V2) {
12889            let len = __tmp.len();
12890            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12891        } else {
12892            __tmp.len()
12893        }
12894    }
12895}
12896#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
12897#[doc = ""]
12898#[doc = "ID: 146"]
12899#[derive(Debug, Clone, PartialEq)]
12900#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12902#[cfg_attr(feature = "ts", derive(TS))]
12903#[cfg_attr(feature = "ts", ts(export))]
12904pub struct CONTROL_SYSTEM_STATE_DATA {
12905    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12906    pub time_usec: u64,
12907    #[doc = "X acceleration in body frame"]
12908    pub x_acc: f32,
12909    #[doc = "Y acceleration in body frame"]
12910    pub y_acc: f32,
12911    #[doc = "Z acceleration in body frame"]
12912    pub z_acc: f32,
12913    #[doc = "X velocity in body frame"]
12914    pub x_vel: f32,
12915    #[doc = "Y velocity in body frame"]
12916    pub y_vel: f32,
12917    #[doc = "Z velocity in body frame"]
12918    pub z_vel: f32,
12919    #[doc = "X position in local frame"]
12920    pub x_pos: f32,
12921    #[doc = "Y position in local frame"]
12922    pub y_pos: f32,
12923    #[doc = "Z position in local frame"]
12924    pub z_pos: f32,
12925    #[doc = "Airspeed, set to -1 if unknown"]
12926    pub airspeed: f32,
12927    #[doc = "Variance of body velocity estimate"]
12928    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12929    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12930    pub vel_variance: [f32; 3],
12931    #[doc = "Variance in local position"]
12932    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12933    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12934    pub pos_variance: [f32; 3],
12935    #[doc = "The attitude, represented as Quaternion"]
12936    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12937    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12938    pub q: [f32; 4],
12939    #[doc = "Angular rate in roll axis"]
12940    pub roll_rate: f32,
12941    #[doc = "Angular rate in pitch axis"]
12942    pub pitch_rate: f32,
12943    #[doc = "Angular rate in yaw axis"]
12944    pub yaw_rate: f32,
12945}
12946impl CONTROL_SYSTEM_STATE_DATA {
12947    pub const ENCODED_LEN: usize = 100usize;
12948    pub const DEFAULT: Self = Self {
12949        time_usec: 0_u64,
12950        x_acc: 0.0_f32,
12951        y_acc: 0.0_f32,
12952        z_acc: 0.0_f32,
12953        x_vel: 0.0_f32,
12954        y_vel: 0.0_f32,
12955        z_vel: 0.0_f32,
12956        x_pos: 0.0_f32,
12957        y_pos: 0.0_f32,
12958        z_pos: 0.0_f32,
12959        airspeed: 0.0_f32,
12960        vel_variance: [0.0_f32; 3usize],
12961        pos_variance: [0.0_f32; 3usize],
12962        q: [0.0_f32; 4usize],
12963        roll_rate: 0.0_f32,
12964        pitch_rate: 0.0_f32,
12965        yaw_rate: 0.0_f32,
12966    };
12967    #[cfg(feature = "arbitrary")]
12968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12969        use arbitrary::{Arbitrary, Unstructured};
12970        let mut buf = [0u8; 1024];
12971        rng.fill_bytes(&mut buf);
12972        let mut unstructured = Unstructured::new(&buf);
12973        Self::arbitrary(&mut unstructured).unwrap_or_default()
12974    }
12975}
12976impl Default for CONTROL_SYSTEM_STATE_DATA {
12977    fn default() -> Self {
12978        Self::DEFAULT.clone()
12979    }
12980}
12981impl MessageData for CONTROL_SYSTEM_STATE_DATA {
12982    type Message = MavMessage;
12983    const ID: u32 = 146u32;
12984    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
12985    const EXTRA_CRC: u8 = 103u8;
12986    const ENCODED_LEN: usize = 100usize;
12987    fn deser(
12988        _version: MavlinkVersion,
12989        __input: &[u8],
12990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12991        let avail_len = __input.len();
12992        let mut payload_buf = [0; Self::ENCODED_LEN];
12993        let mut buf = if avail_len < Self::ENCODED_LEN {
12994            payload_buf[0..avail_len].copy_from_slice(__input);
12995            Bytes::new(&payload_buf)
12996        } else {
12997            Bytes::new(__input)
12998        };
12999        let mut __struct = Self::default();
13000        __struct.time_usec = buf.get_u64_le()?;
13001        __struct.x_acc = buf.get_f32_le()?;
13002        __struct.y_acc = buf.get_f32_le()?;
13003        __struct.z_acc = buf.get_f32_le()?;
13004        __struct.x_vel = buf.get_f32_le()?;
13005        __struct.y_vel = buf.get_f32_le()?;
13006        __struct.z_vel = buf.get_f32_le()?;
13007        __struct.x_pos = buf.get_f32_le()?;
13008        __struct.y_pos = buf.get_f32_le()?;
13009        __struct.z_pos = buf.get_f32_le()?;
13010        __struct.airspeed = buf.get_f32_le()?;
13011        for v in &mut __struct.vel_variance {
13012            let val = buf.get_f32_le()?;
13013            *v = val;
13014        }
13015        for v in &mut __struct.pos_variance {
13016            let val = buf.get_f32_le()?;
13017            *v = val;
13018        }
13019        for v in &mut __struct.q {
13020            let val = buf.get_f32_le()?;
13021            *v = val;
13022        }
13023        __struct.roll_rate = buf.get_f32_le()?;
13024        __struct.pitch_rate = buf.get_f32_le()?;
13025        __struct.yaw_rate = buf.get_f32_le()?;
13026        Ok(__struct)
13027    }
13028    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13029        let mut __tmp = BytesMut::new(bytes);
13030        #[allow(clippy::absurd_extreme_comparisons)]
13031        #[allow(unused_comparisons)]
13032        if __tmp.remaining() < Self::ENCODED_LEN {
13033            panic!(
13034                "buffer is too small (need {} bytes, but got {})",
13035                Self::ENCODED_LEN,
13036                __tmp.remaining(),
13037            )
13038        }
13039        __tmp.put_u64_le(self.time_usec);
13040        __tmp.put_f32_le(self.x_acc);
13041        __tmp.put_f32_le(self.y_acc);
13042        __tmp.put_f32_le(self.z_acc);
13043        __tmp.put_f32_le(self.x_vel);
13044        __tmp.put_f32_le(self.y_vel);
13045        __tmp.put_f32_le(self.z_vel);
13046        __tmp.put_f32_le(self.x_pos);
13047        __tmp.put_f32_le(self.y_pos);
13048        __tmp.put_f32_le(self.z_pos);
13049        __tmp.put_f32_le(self.airspeed);
13050        for val in &self.vel_variance {
13051            __tmp.put_f32_le(*val);
13052        }
13053        for val in &self.pos_variance {
13054            __tmp.put_f32_le(*val);
13055        }
13056        for val in &self.q {
13057            __tmp.put_f32_le(*val);
13058        }
13059        __tmp.put_f32_le(self.roll_rate);
13060        __tmp.put_f32_le(self.pitch_rate);
13061        __tmp.put_f32_le(self.yaw_rate);
13062        if matches!(version, MavlinkVersion::V2) {
13063            let len = __tmp.len();
13064            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13065        } else {
13066            __tmp.len()
13067        }
13068    }
13069}
13070#[doc = "offset response to encapsulated data."]
13071#[doc = ""]
13072#[doc = "ID: 50005"]
13073#[derive(Debug, Clone, PartialEq)]
13074#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13076#[cfg_attr(feature = "ts", derive(TS))]
13077#[cfg_attr(feature = "ts", ts(export))]
13078pub struct CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
13079    #[doc = "FW Offset."]
13080    pub offset: u32,
13081    #[doc = "System ID."]
13082    pub target_system: u8,
13083    #[doc = "Component ID."]
13084    pub target_component: u8,
13085}
13086impl CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
13087    pub const ENCODED_LEN: usize = 6usize;
13088    pub const DEFAULT: Self = Self {
13089        offset: 0_u32,
13090        target_system: 0_u8,
13091        target_component: 0_u8,
13092    };
13093    #[cfg(feature = "arbitrary")]
13094    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13095        use arbitrary::{Arbitrary, Unstructured};
13096        let mut buf = [0u8; 1024];
13097        rng.fill_bytes(&mut buf);
13098        let mut unstructured = Unstructured::new(&buf);
13099        Self::arbitrary(&mut unstructured).unwrap_or_default()
13100    }
13101}
13102impl Default for CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
13103    fn default() -> Self {
13104        Self::DEFAULT.clone()
13105    }
13106}
13107impl MessageData for CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
13108    type Message = MavMessage;
13109    const ID: u32 = 50005u32;
13110    const NAME: &'static str = "CUBEPILOT_FIRMWARE_UPDATE_RESP";
13111    const EXTRA_CRC: u8 = 152u8;
13112    const ENCODED_LEN: usize = 6usize;
13113    fn deser(
13114        _version: MavlinkVersion,
13115        __input: &[u8],
13116    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13117        let avail_len = __input.len();
13118        let mut payload_buf = [0; Self::ENCODED_LEN];
13119        let mut buf = if avail_len < Self::ENCODED_LEN {
13120            payload_buf[0..avail_len].copy_from_slice(__input);
13121            Bytes::new(&payload_buf)
13122        } else {
13123            Bytes::new(__input)
13124        };
13125        let mut __struct = Self::default();
13126        __struct.offset = buf.get_u32_le()?;
13127        __struct.target_system = buf.get_u8()?;
13128        __struct.target_component = buf.get_u8()?;
13129        Ok(__struct)
13130    }
13131    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13132        let mut __tmp = BytesMut::new(bytes);
13133        #[allow(clippy::absurd_extreme_comparisons)]
13134        #[allow(unused_comparisons)]
13135        if __tmp.remaining() < Self::ENCODED_LEN {
13136            panic!(
13137                "buffer is too small (need {} bytes, but got {})",
13138                Self::ENCODED_LEN,
13139                __tmp.remaining(),
13140            )
13141        }
13142        __tmp.put_u32_le(self.offset);
13143        __tmp.put_u8(self.target_system);
13144        __tmp.put_u8(self.target_component);
13145        if matches!(version, MavlinkVersion::V2) {
13146            let len = __tmp.len();
13147            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13148        } else {
13149            __tmp.len()
13150        }
13151    }
13152}
13153#[doc = "Start firmware update with encapsulated data."]
13154#[doc = ""]
13155#[doc = "ID: 50004"]
13156#[derive(Debug, Clone, PartialEq)]
13157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13159#[cfg_attr(feature = "ts", derive(TS))]
13160#[cfg_attr(feature = "ts", ts(export))]
13161pub struct CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
13162    #[doc = "FW Size."]
13163    pub size: u32,
13164    #[doc = "FW CRC."]
13165    pub crc: u32,
13166    #[doc = "System ID."]
13167    pub target_system: u8,
13168    #[doc = "Component ID."]
13169    pub target_component: u8,
13170}
13171impl CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
13172    pub const ENCODED_LEN: usize = 10usize;
13173    pub const DEFAULT: Self = Self {
13174        size: 0_u32,
13175        crc: 0_u32,
13176        target_system: 0_u8,
13177        target_component: 0_u8,
13178    };
13179    #[cfg(feature = "arbitrary")]
13180    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13181        use arbitrary::{Arbitrary, Unstructured};
13182        let mut buf = [0u8; 1024];
13183        rng.fill_bytes(&mut buf);
13184        let mut unstructured = Unstructured::new(&buf);
13185        Self::arbitrary(&mut unstructured).unwrap_or_default()
13186    }
13187}
13188impl Default for CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
13189    fn default() -> Self {
13190        Self::DEFAULT.clone()
13191    }
13192}
13193impl MessageData for CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
13194    type Message = MavMessage;
13195    const ID: u32 = 50004u32;
13196    const NAME: &'static str = "CUBEPILOT_FIRMWARE_UPDATE_START";
13197    const EXTRA_CRC: u8 = 240u8;
13198    const ENCODED_LEN: usize = 10usize;
13199    fn deser(
13200        _version: MavlinkVersion,
13201        __input: &[u8],
13202    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13203        let avail_len = __input.len();
13204        let mut payload_buf = [0; Self::ENCODED_LEN];
13205        let mut buf = if avail_len < Self::ENCODED_LEN {
13206            payload_buf[0..avail_len].copy_from_slice(__input);
13207            Bytes::new(&payload_buf)
13208        } else {
13209            Bytes::new(__input)
13210        };
13211        let mut __struct = Self::default();
13212        __struct.size = buf.get_u32_le()?;
13213        __struct.crc = buf.get_u32_le()?;
13214        __struct.target_system = buf.get_u8()?;
13215        __struct.target_component = buf.get_u8()?;
13216        Ok(__struct)
13217    }
13218    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13219        let mut __tmp = BytesMut::new(bytes);
13220        #[allow(clippy::absurd_extreme_comparisons)]
13221        #[allow(unused_comparisons)]
13222        if __tmp.remaining() < Self::ENCODED_LEN {
13223            panic!(
13224                "buffer is too small (need {} bytes, but got {})",
13225                Self::ENCODED_LEN,
13226                __tmp.remaining(),
13227            )
13228        }
13229        __tmp.put_u32_le(self.size);
13230        __tmp.put_u32_le(self.crc);
13231        __tmp.put_u8(self.target_system);
13232        __tmp.put_u8(self.target_component);
13233        if matches!(version, MavlinkVersion::V2) {
13234            let len = __tmp.len();
13235            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13236        } else {
13237            __tmp.len()
13238        }
13239    }
13240}
13241#[doc = "Raw RC Data."]
13242#[doc = ""]
13243#[doc = "ID: 50001"]
13244#[derive(Debug, Clone, PartialEq)]
13245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13247#[cfg_attr(feature = "ts", derive(TS))]
13248#[cfg_attr(feature = "ts", ts(export))]
13249pub struct CUBEPILOT_RAW_RC_DATA {
13250    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13251    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13252    pub rc_raw: [u8; 32],
13253}
13254impl CUBEPILOT_RAW_RC_DATA {
13255    pub const ENCODED_LEN: usize = 32usize;
13256    pub const DEFAULT: Self = Self {
13257        rc_raw: [0_u8; 32usize],
13258    };
13259    #[cfg(feature = "arbitrary")]
13260    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13261        use arbitrary::{Arbitrary, Unstructured};
13262        let mut buf = [0u8; 1024];
13263        rng.fill_bytes(&mut buf);
13264        let mut unstructured = Unstructured::new(&buf);
13265        Self::arbitrary(&mut unstructured).unwrap_or_default()
13266    }
13267}
13268impl Default for CUBEPILOT_RAW_RC_DATA {
13269    fn default() -> Self {
13270        Self::DEFAULT.clone()
13271    }
13272}
13273impl MessageData for CUBEPILOT_RAW_RC_DATA {
13274    type Message = MavMessage;
13275    const ID: u32 = 50001u32;
13276    const NAME: &'static str = "CUBEPILOT_RAW_RC";
13277    const EXTRA_CRC: u8 = 246u8;
13278    const ENCODED_LEN: usize = 32usize;
13279    fn deser(
13280        _version: MavlinkVersion,
13281        __input: &[u8],
13282    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13283        let avail_len = __input.len();
13284        let mut payload_buf = [0; Self::ENCODED_LEN];
13285        let mut buf = if avail_len < Self::ENCODED_LEN {
13286            payload_buf[0..avail_len].copy_from_slice(__input);
13287            Bytes::new(&payload_buf)
13288        } else {
13289            Bytes::new(__input)
13290        };
13291        let mut __struct = Self::default();
13292        for v in &mut __struct.rc_raw {
13293            let val = buf.get_u8()?;
13294            *v = val;
13295        }
13296        Ok(__struct)
13297    }
13298    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13299        let mut __tmp = BytesMut::new(bytes);
13300        #[allow(clippy::absurd_extreme_comparisons)]
13301        #[allow(unused_comparisons)]
13302        if __tmp.remaining() < Self::ENCODED_LEN {
13303            panic!(
13304                "buffer is too small (need {} bytes, but got {})",
13305                Self::ENCODED_LEN,
13306                __tmp.remaining(),
13307            )
13308        }
13309        for val in &self.rc_raw {
13310            __tmp.put_u8(*val);
13311        }
13312        if matches!(version, MavlinkVersion::V2) {
13313            let len = __tmp.len();
13314            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13315        } else {
13316            __tmp.len()
13317        }
13318    }
13319}
13320#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
13321#[doc = ""]
13322#[doc = "ID: 411"]
13323#[derive(Debug, Clone, PartialEq)]
13324#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13325#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13326#[cfg_attr(feature = "ts", derive(TS))]
13327#[cfg_attr(feature = "ts", ts(export))]
13328pub struct CURRENT_EVENT_SEQUENCE_DATA {
13329    #[doc = "Sequence number."]
13330    pub sequence: u16,
13331    #[doc = "Flag bitset."]
13332    pub flags: MavEventCurrentSequenceFlags,
13333}
13334impl CURRENT_EVENT_SEQUENCE_DATA {
13335    pub const ENCODED_LEN: usize = 3usize;
13336    pub const DEFAULT: Self = Self {
13337        sequence: 0_u16,
13338        flags: MavEventCurrentSequenceFlags::DEFAULT,
13339    };
13340    #[cfg(feature = "arbitrary")]
13341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13342        use arbitrary::{Arbitrary, Unstructured};
13343        let mut buf = [0u8; 1024];
13344        rng.fill_bytes(&mut buf);
13345        let mut unstructured = Unstructured::new(&buf);
13346        Self::arbitrary(&mut unstructured).unwrap_or_default()
13347    }
13348}
13349impl Default for CURRENT_EVENT_SEQUENCE_DATA {
13350    fn default() -> Self {
13351        Self::DEFAULT.clone()
13352    }
13353}
13354impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
13355    type Message = MavMessage;
13356    const ID: u32 = 411u32;
13357    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
13358    const EXTRA_CRC: u8 = 106u8;
13359    const ENCODED_LEN: usize = 3usize;
13360    fn deser(
13361        _version: MavlinkVersion,
13362        __input: &[u8],
13363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13364        let avail_len = __input.len();
13365        let mut payload_buf = [0; Self::ENCODED_LEN];
13366        let mut buf = if avail_len < Self::ENCODED_LEN {
13367            payload_buf[0..avail_len].copy_from_slice(__input);
13368            Bytes::new(&payload_buf)
13369        } else {
13370            Bytes::new(__input)
13371        };
13372        let mut __struct = Self::default();
13373        __struct.sequence = buf.get_u16_le()?;
13374        let tmp = buf.get_u8()?;
13375        __struct.flags =
13376            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13377                enum_type: "MavEventCurrentSequenceFlags",
13378                value: tmp as u64,
13379            })?;
13380        Ok(__struct)
13381    }
13382    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13383        let mut __tmp = BytesMut::new(bytes);
13384        #[allow(clippy::absurd_extreme_comparisons)]
13385        #[allow(unused_comparisons)]
13386        if __tmp.remaining() < Self::ENCODED_LEN {
13387            panic!(
13388                "buffer is too small (need {} bytes, but got {})",
13389                Self::ENCODED_LEN,
13390                __tmp.remaining(),
13391            )
13392        }
13393        __tmp.put_u16_le(self.sequence);
13394        __tmp.put_u8(self.flags as u8);
13395        if matches!(version, MavlinkVersion::V2) {
13396            let len = __tmp.len();
13397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13398        } else {
13399            __tmp.len()
13400        }
13401    }
13402}
13403#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
13404#[doc = ""]
13405#[doc = "ID: 436"]
13406#[derive(Debug, Clone, PartialEq)]
13407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13409#[cfg_attr(feature = "ts", derive(TS))]
13410#[cfg_attr(feature = "ts", ts(export))]
13411pub struct CURRENT_MODE_DATA {
13412    #[doc = "A bitfield for use for autopilot-specific flags"]
13413    pub custom_mode: u32,
13414    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
13415    pub intended_custom_mode: u32,
13416    #[doc = "Standard mode."]
13417    pub standard_mode: MavStandardMode,
13418}
13419impl CURRENT_MODE_DATA {
13420    pub const ENCODED_LEN: usize = 9usize;
13421    pub const DEFAULT: Self = Self {
13422        custom_mode: 0_u32,
13423        intended_custom_mode: 0_u32,
13424        standard_mode: MavStandardMode::DEFAULT,
13425    };
13426    #[cfg(feature = "arbitrary")]
13427    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13428        use arbitrary::{Arbitrary, Unstructured};
13429        let mut buf = [0u8; 1024];
13430        rng.fill_bytes(&mut buf);
13431        let mut unstructured = Unstructured::new(&buf);
13432        Self::arbitrary(&mut unstructured).unwrap_or_default()
13433    }
13434}
13435impl Default for CURRENT_MODE_DATA {
13436    fn default() -> Self {
13437        Self::DEFAULT.clone()
13438    }
13439}
13440impl MessageData for CURRENT_MODE_DATA {
13441    type Message = MavMessage;
13442    const ID: u32 = 436u32;
13443    const NAME: &'static str = "CURRENT_MODE";
13444    const EXTRA_CRC: u8 = 193u8;
13445    const ENCODED_LEN: usize = 9usize;
13446    fn deser(
13447        _version: MavlinkVersion,
13448        __input: &[u8],
13449    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13450        let avail_len = __input.len();
13451        let mut payload_buf = [0; Self::ENCODED_LEN];
13452        let mut buf = if avail_len < Self::ENCODED_LEN {
13453            payload_buf[0..avail_len].copy_from_slice(__input);
13454            Bytes::new(&payload_buf)
13455        } else {
13456            Bytes::new(__input)
13457        };
13458        let mut __struct = Self::default();
13459        __struct.custom_mode = buf.get_u32_le()?;
13460        __struct.intended_custom_mode = buf.get_u32_le()?;
13461        let tmp = buf.get_u8()?;
13462        __struct.standard_mode =
13463            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13464                enum_type: "MavStandardMode",
13465                value: tmp as u64,
13466            })?;
13467        Ok(__struct)
13468    }
13469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13470        let mut __tmp = BytesMut::new(bytes);
13471        #[allow(clippy::absurd_extreme_comparisons)]
13472        #[allow(unused_comparisons)]
13473        if __tmp.remaining() < Self::ENCODED_LEN {
13474            panic!(
13475                "buffer is too small (need {} bytes, but got {})",
13476                Self::ENCODED_LEN,
13477                __tmp.remaining(),
13478            )
13479        }
13480        __tmp.put_u32_le(self.custom_mode);
13481        __tmp.put_u32_le(self.intended_custom_mode);
13482        __tmp.put_u8(self.standard_mode as u8);
13483        if matches!(version, MavlinkVersion::V2) {
13484            let len = __tmp.len();
13485            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13486        } else {
13487            __tmp.len()
13488        }
13489    }
13490}
13491#[doc = "Data packet, size 16."]
13492#[doc = ""]
13493#[doc = "ID: 169"]
13494#[derive(Debug, Clone, PartialEq)]
13495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13497#[cfg_attr(feature = "ts", derive(TS))]
13498#[cfg_attr(feature = "ts", ts(export))]
13499pub struct DATA16_DATA {
13500    #[doc = "Data type."]
13501    pub mavtype: u8,
13502    #[doc = "Data length."]
13503    pub len: u8,
13504    #[doc = "Raw data."]
13505    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13506    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13507    pub data: [u8; 16],
13508}
13509impl DATA16_DATA {
13510    pub const ENCODED_LEN: usize = 18usize;
13511    pub const DEFAULT: Self = Self {
13512        mavtype: 0_u8,
13513        len: 0_u8,
13514        data: [0_u8; 16usize],
13515    };
13516    #[cfg(feature = "arbitrary")]
13517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13518        use arbitrary::{Arbitrary, Unstructured};
13519        let mut buf = [0u8; 1024];
13520        rng.fill_bytes(&mut buf);
13521        let mut unstructured = Unstructured::new(&buf);
13522        Self::arbitrary(&mut unstructured).unwrap_or_default()
13523    }
13524}
13525impl Default for DATA16_DATA {
13526    fn default() -> Self {
13527        Self::DEFAULT.clone()
13528    }
13529}
13530impl MessageData for DATA16_DATA {
13531    type Message = MavMessage;
13532    const ID: u32 = 169u32;
13533    const NAME: &'static str = "DATA16";
13534    const EXTRA_CRC: u8 = 234u8;
13535    const ENCODED_LEN: usize = 18usize;
13536    fn deser(
13537        _version: MavlinkVersion,
13538        __input: &[u8],
13539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13540        let avail_len = __input.len();
13541        let mut payload_buf = [0; Self::ENCODED_LEN];
13542        let mut buf = if avail_len < Self::ENCODED_LEN {
13543            payload_buf[0..avail_len].copy_from_slice(__input);
13544            Bytes::new(&payload_buf)
13545        } else {
13546            Bytes::new(__input)
13547        };
13548        let mut __struct = Self::default();
13549        __struct.mavtype = buf.get_u8()?;
13550        __struct.len = buf.get_u8()?;
13551        for v in &mut __struct.data {
13552            let val = buf.get_u8()?;
13553            *v = val;
13554        }
13555        Ok(__struct)
13556    }
13557    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13558        let mut __tmp = BytesMut::new(bytes);
13559        #[allow(clippy::absurd_extreme_comparisons)]
13560        #[allow(unused_comparisons)]
13561        if __tmp.remaining() < Self::ENCODED_LEN {
13562            panic!(
13563                "buffer is too small (need {} bytes, but got {})",
13564                Self::ENCODED_LEN,
13565                __tmp.remaining(),
13566            )
13567        }
13568        __tmp.put_u8(self.mavtype);
13569        __tmp.put_u8(self.len);
13570        for val in &self.data {
13571            __tmp.put_u8(*val);
13572        }
13573        if matches!(version, MavlinkVersion::V2) {
13574            let len = __tmp.len();
13575            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13576        } else {
13577            __tmp.len()
13578        }
13579    }
13580}
13581#[doc = "Data packet, size 32."]
13582#[doc = ""]
13583#[doc = "ID: 170"]
13584#[derive(Debug, Clone, PartialEq)]
13585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13587#[cfg_attr(feature = "ts", derive(TS))]
13588#[cfg_attr(feature = "ts", ts(export))]
13589pub struct DATA32_DATA {
13590    #[doc = "Data type."]
13591    pub mavtype: u8,
13592    #[doc = "Data length."]
13593    pub len: u8,
13594    #[doc = "Raw data."]
13595    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13596    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13597    pub data: [u8; 32],
13598}
13599impl DATA32_DATA {
13600    pub const ENCODED_LEN: usize = 34usize;
13601    pub const DEFAULT: Self = Self {
13602        mavtype: 0_u8,
13603        len: 0_u8,
13604        data: [0_u8; 32usize],
13605    };
13606    #[cfg(feature = "arbitrary")]
13607    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13608        use arbitrary::{Arbitrary, Unstructured};
13609        let mut buf = [0u8; 1024];
13610        rng.fill_bytes(&mut buf);
13611        let mut unstructured = Unstructured::new(&buf);
13612        Self::arbitrary(&mut unstructured).unwrap_or_default()
13613    }
13614}
13615impl Default for DATA32_DATA {
13616    fn default() -> Self {
13617        Self::DEFAULT.clone()
13618    }
13619}
13620impl MessageData for DATA32_DATA {
13621    type Message = MavMessage;
13622    const ID: u32 = 170u32;
13623    const NAME: &'static str = "DATA32";
13624    const EXTRA_CRC: u8 = 73u8;
13625    const ENCODED_LEN: usize = 34usize;
13626    fn deser(
13627        _version: MavlinkVersion,
13628        __input: &[u8],
13629    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13630        let avail_len = __input.len();
13631        let mut payload_buf = [0; Self::ENCODED_LEN];
13632        let mut buf = if avail_len < Self::ENCODED_LEN {
13633            payload_buf[0..avail_len].copy_from_slice(__input);
13634            Bytes::new(&payload_buf)
13635        } else {
13636            Bytes::new(__input)
13637        };
13638        let mut __struct = Self::default();
13639        __struct.mavtype = buf.get_u8()?;
13640        __struct.len = buf.get_u8()?;
13641        for v in &mut __struct.data {
13642            let val = buf.get_u8()?;
13643            *v = val;
13644        }
13645        Ok(__struct)
13646    }
13647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13648        let mut __tmp = BytesMut::new(bytes);
13649        #[allow(clippy::absurd_extreme_comparisons)]
13650        #[allow(unused_comparisons)]
13651        if __tmp.remaining() < Self::ENCODED_LEN {
13652            panic!(
13653                "buffer is too small (need {} bytes, but got {})",
13654                Self::ENCODED_LEN,
13655                __tmp.remaining(),
13656            )
13657        }
13658        __tmp.put_u8(self.mavtype);
13659        __tmp.put_u8(self.len);
13660        for val in &self.data {
13661            __tmp.put_u8(*val);
13662        }
13663        if matches!(version, MavlinkVersion::V2) {
13664            let len = __tmp.len();
13665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13666        } else {
13667            __tmp.len()
13668        }
13669    }
13670}
13671#[doc = "Data packet, size 64."]
13672#[doc = ""]
13673#[doc = "ID: 171"]
13674#[derive(Debug, Clone, PartialEq)]
13675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13677#[cfg_attr(feature = "ts", derive(TS))]
13678#[cfg_attr(feature = "ts", ts(export))]
13679pub struct DATA64_DATA {
13680    #[doc = "Data type."]
13681    pub mavtype: u8,
13682    #[doc = "Data length."]
13683    pub len: u8,
13684    #[doc = "Raw data."]
13685    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13686    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13687    pub data: [u8; 64],
13688}
13689impl DATA64_DATA {
13690    pub const ENCODED_LEN: usize = 66usize;
13691    pub const DEFAULT: Self = Self {
13692        mavtype: 0_u8,
13693        len: 0_u8,
13694        data: [0_u8; 64usize],
13695    };
13696    #[cfg(feature = "arbitrary")]
13697    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13698        use arbitrary::{Arbitrary, Unstructured};
13699        let mut buf = [0u8; 1024];
13700        rng.fill_bytes(&mut buf);
13701        let mut unstructured = Unstructured::new(&buf);
13702        Self::arbitrary(&mut unstructured).unwrap_or_default()
13703    }
13704}
13705impl Default for DATA64_DATA {
13706    fn default() -> Self {
13707        Self::DEFAULT.clone()
13708    }
13709}
13710impl MessageData for DATA64_DATA {
13711    type Message = MavMessage;
13712    const ID: u32 = 171u32;
13713    const NAME: &'static str = "DATA64";
13714    const EXTRA_CRC: u8 = 181u8;
13715    const ENCODED_LEN: usize = 66usize;
13716    fn deser(
13717        _version: MavlinkVersion,
13718        __input: &[u8],
13719    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13720        let avail_len = __input.len();
13721        let mut payload_buf = [0; Self::ENCODED_LEN];
13722        let mut buf = if avail_len < Self::ENCODED_LEN {
13723            payload_buf[0..avail_len].copy_from_slice(__input);
13724            Bytes::new(&payload_buf)
13725        } else {
13726            Bytes::new(__input)
13727        };
13728        let mut __struct = Self::default();
13729        __struct.mavtype = buf.get_u8()?;
13730        __struct.len = buf.get_u8()?;
13731        for v in &mut __struct.data {
13732            let val = buf.get_u8()?;
13733            *v = val;
13734        }
13735        Ok(__struct)
13736    }
13737    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13738        let mut __tmp = BytesMut::new(bytes);
13739        #[allow(clippy::absurd_extreme_comparisons)]
13740        #[allow(unused_comparisons)]
13741        if __tmp.remaining() < Self::ENCODED_LEN {
13742            panic!(
13743                "buffer is too small (need {} bytes, but got {})",
13744                Self::ENCODED_LEN,
13745                __tmp.remaining(),
13746            )
13747        }
13748        __tmp.put_u8(self.mavtype);
13749        __tmp.put_u8(self.len);
13750        for val in &self.data {
13751            __tmp.put_u8(*val);
13752        }
13753        if matches!(version, MavlinkVersion::V2) {
13754            let len = __tmp.len();
13755            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13756        } else {
13757            __tmp.len()
13758        }
13759    }
13760}
13761#[doc = "Data packet, size 96."]
13762#[doc = ""]
13763#[doc = "ID: 172"]
13764#[derive(Debug, Clone, PartialEq)]
13765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13767#[cfg_attr(feature = "ts", derive(TS))]
13768#[cfg_attr(feature = "ts", ts(export))]
13769pub struct DATA96_DATA {
13770    #[doc = "Data type."]
13771    pub mavtype: u8,
13772    #[doc = "Data length."]
13773    pub len: u8,
13774    #[doc = "Raw data."]
13775    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13776    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13777    pub data: [u8; 96],
13778}
13779impl DATA96_DATA {
13780    pub const ENCODED_LEN: usize = 98usize;
13781    pub const DEFAULT: Self = Self {
13782        mavtype: 0_u8,
13783        len: 0_u8,
13784        data: [0_u8; 96usize],
13785    };
13786    #[cfg(feature = "arbitrary")]
13787    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13788        use arbitrary::{Arbitrary, Unstructured};
13789        let mut buf = [0u8; 1024];
13790        rng.fill_bytes(&mut buf);
13791        let mut unstructured = Unstructured::new(&buf);
13792        Self::arbitrary(&mut unstructured).unwrap_or_default()
13793    }
13794}
13795impl Default for DATA96_DATA {
13796    fn default() -> Self {
13797        Self::DEFAULT.clone()
13798    }
13799}
13800impl MessageData for DATA96_DATA {
13801    type Message = MavMessage;
13802    const ID: u32 = 172u32;
13803    const NAME: &'static str = "DATA96";
13804    const EXTRA_CRC: u8 = 22u8;
13805    const ENCODED_LEN: usize = 98usize;
13806    fn deser(
13807        _version: MavlinkVersion,
13808        __input: &[u8],
13809    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13810        let avail_len = __input.len();
13811        let mut payload_buf = [0; Self::ENCODED_LEN];
13812        let mut buf = if avail_len < Self::ENCODED_LEN {
13813            payload_buf[0..avail_len].copy_from_slice(__input);
13814            Bytes::new(&payload_buf)
13815        } else {
13816            Bytes::new(__input)
13817        };
13818        let mut __struct = Self::default();
13819        __struct.mavtype = buf.get_u8()?;
13820        __struct.len = buf.get_u8()?;
13821        for v in &mut __struct.data {
13822            let val = buf.get_u8()?;
13823            *v = val;
13824        }
13825        Ok(__struct)
13826    }
13827    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13828        let mut __tmp = BytesMut::new(bytes);
13829        #[allow(clippy::absurd_extreme_comparisons)]
13830        #[allow(unused_comparisons)]
13831        if __tmp.remaining() < Self::ENCODED_LEN {
13832            panic!(
13833                "buffer is too small (need {} bytes, but got {})",
13834                Self::ENCODED_LEN,
13835                __tmp.remaining(),
13836            )
13837        }
13838        __tmp.put_u8(self.mavtype);
13839        __tmp.put_u8(self.len);
13840        for val in &self.data {
13841            __tmp.put_u8(*val);
13842        }
13843        if matches!(version, MavlinkVersion::V2) {
13844            let len = __tmp.len();
13845            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13846        } else {
13847            __tmp.len()
13848        }
13849    }
13850}
13851#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
13852#[doc = "Data stream status information."]
13853#[doc = ""]
13854#[doc = "ID: 67"]
13855#[derive(Debug, Clone, PartialEq)]
13856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13858#[cfg_attr(feature = "ts", derive(TS))]
13859#[cfg_attr(feature = "ts", ts(export))]
13860pub struct DATA_STREAM_DATA {
13861    #[doc = "The message rate"]
13862    pub message_rate: u16,
13863    #[doc = "The ID of the requested data stream"]
13864    pub stream_id: u8,
13865    #[doc = "1 stream is enabled, 0 stream is stopped."]
13866    pub on_off: u8,
13867}
13868impl DATA_STREAM_DATA {
13869    pub const ENCODED_LEN: usize = 4usize;
13870    pub const DEFAULT: Self = Self {
13871        message_rate: 0_u16,
13872        stream_id: 0_u8,
13873        on_off: 0_u8,
13874    };
13875    #[cfg(feature = "arbitrary")]
13876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13877        use arbitrary::{Arbitrary, Unstructured};
13878        let mut buf = [0u8; 1024];
13879        rng.fill_bytes(&mut buf);
13880        let mut unstructured = Unstructured::new(&buf);
13881        Self::arbitrary(&mut unstructured).unwrap_or_default()
13882    }
13883}
13884impl Default for DATA_STREAM_DATA {
13885    fn default() -> Self {
13886        Self::DEFAULT.clone()
13887    }
13888}
13889impl MessageData for DATA_STREAM_DATA {
13890    type Message = MavMessage;
13891    const ID: u32 = 67u32;
13892    const NAME: &'static str = "DATA_STREAM";
13893    const EXTRA_CRC: u8 = 21u8;
13894    const ENCODED_LEN: usize = 4usize;
13895    fn deser(
13896        _version: MavlinkVersion,
13897        __input: &[u8],
13898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13899        let avail_len = __input.len();
13900        let mut payload_buf = [0; Self::ENCODED_LEN];
13901        let mut buf = if avail_len < Self::ENCODED_LEN {
13902            payload_buf[0..avail_len].copy_from_slice(__input);
13903            Bytes::new(&payload_buf)
13904        } else {
13905            Bytes::new(__input)
13906        };
13907        let mut __struct = Self::default();
13908        __struct.message_rate = buf.get_u16_le()?;
13909        __struct.stream_id = buf.get_u8()?;
13910        __struct.on_off = buf.get_u8()?;
13911        Ok(__struct)
13912    }
13913    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13914        let mut __tmp = BytesMut::new(bytes);
13915        #[allow(clippy::absurd_extreme_comparisons)]
13916        #[allow(unused_comparisons)]
13917        if __tmp.remaining() < Self::ENCODED_LEN {
13918            panic!(
13919                "buffer is too small (need {} bytes, but got {})",
13920                Self::ENCODED_LEN,
13921                __tmp.remaining(),
13922            )
13923        }
13924        __tmp.put_u16_le(self.message_rate);
13925        __tmp.put_u8(self.stream_id);
13926        __tmp.put_u8(self.on_off);
13927        if matches!(version, MavlinkVersion::V2) {
13928            let len = __tmp.len();
13929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13930        } else {
13931            __tmp.len()
13932        }
13933    }
13934}
13935#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
13936#[doc = ""]
13937#[doc = "ID: 130"]
13938#[derive(Debug, Clone, PartialEq)]
13939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13941#[cfg_attr(feature = "ts", derive(TS))]
13942#[cfg_attr(feature = "ts", ts(export))]
13943pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
13944    #[doc = "total data size (set on ACK only)."]
13945    pub size: u32,
13946    #[doc = "Width of a matrix or image."]
13947    pub width: u16,
13948    #[doc = "Height of a matrix or image."]
13949    pub height: u16,
13950    #[doc = "Number of packets being sent (set on ACK only)."]
13951    pub packets: u16,
13952    #[doc = "Type of requested/acknowledged data."]
13953    pub mavtype: MavlinkDataStreamType,
13954    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
13955    pub payload: u8,
13956    #[doc = "JPEG quality. Values: [1-100]."]
13957    pub jpg_quality: u8,
13958}
13959impl DATA_TRANSMISSION_HANDSHAKE_DATA {
13960    pub const ENCODED_LEN: usize = 13usize;
13961    pub const DEFAULT: Self = Self {
13962        size: 0_u32,
13963        width: 0_u16,
13964        height: 0_u16,
13965        packets: 0_u16,
13966        mavtype: MavlinkDataStreamType::DEFAULT,
13967        payload: 0_u8,
13968        jpg_quality: 0_u8,
13969    };
13970    #[cfg(feature = "arbitrary")]
13971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13972        use arbitrary::{Arbitrary, Unstructured};
13973        let mut buf = [0u8; 1024];
13974        rng.fill_bytes(&mut buf);
13975        let mut unstructured = Unstructured::new(&buf);
13976        Self::arbitrary(&mut unstructured).unwrap_or_default()
13977    }
13978}
13979impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
13980    fn default() -> Self {
13981        Self::DEFAULT.clone()
13982    }
13983}
13984impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
13985    type Message = MavMessage;
13986    const ID: u32 = 130u32;
13987    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
13988    const EXTRA_CRC: u8 = 29u8;
13989    const ENCODED_LEN: usize = 13usize;
13990    fn deser(
13991        _version: MavlinkVersion,
13992        __input: &[u8],
13993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13994        let avail_len = __input.len();
13995        let mut payload_buf = [0; Self::ENCODED_LEN];
13996        let mut buf = if avail_len < Self::ENCODED_LEN {
13997            payload_buf[0..avail_len].copy_from_slice(__input);
13998            Bytes::new(&payload_buf)
13999        } else {
14000            Bytes::new(__input)
14001        };
14002        let mut __struct = Self::default();
14003        __struct.size = buf.get_u32_le()?;
14004        __struct.width = buf.get_u16_le()?;
14005        __struct.height = buf.get_u16_le()?;
14006        __struct.packets = buf.get_u16_le()?;
14007        let tmp = buf.get_u8()?;
14008        __struct.mavtype =
14009            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14010                enum_type: "MavlinkDataStreamType",
14011                value: tmp as u64,
14012            })?;
14013        __struct.payload = buf.get_u8()?;
14014        __struct.jpg_quality = buf.get_u8()?;
14015        Ok(__struct)
14016    }
14017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14018        let mut __tmp = BytesMut::new(bytes);
14019        #[allow(clippy::absurd_extreme_comparisons)]
14020        #[allow(unused_comparisons)]
14021        if __tmp.remaining() < Self::ENCODED_LEN {
14022            panic!(
14023                "buffer is too small (need {} bytes, but got {})",
14024                Self::ENCODED_LEN,
14025                __tmp.remaining(),
14026            )
14027        }
14028        __tmp.put_u32_le(self.size);
14029        __tmp.put_u16_le(self.width);
14030        __tmp.put_u16_le(self.height);
14031        __tmp.put_u16_le(self.packets);
14032        __tmp.put_u8(self.mavtype as u8);
14033        __tmp.put_u8(self.payload);
14034        __tmp.put_u8(self.jpg_quality);
14035        if matches!(version, MavlinkVersion::V2) {
14036            let len = __tmp.len();
14037            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14038        } else {
14039            __tmp.len()
14040        }
14041    }
14042}
14043#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
14044#[doc = ""]
14045#[doc = "ID: 254"]
14046#[derive(Debug, Clone, PartialEq)]
14047#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14049#[cfg_attr(feature = "ts", derive(TS))]
14050#[cfg_attr(feature = "ts", ts(export))]
14051pub struct DEBUG_DATA {
14052    #[doc = "Timestamp (time since system boot)."]
14053    pub time_boot_ms: u32,
14054    #[doc = "DEBUG value"]
14055    pub value: f32,
14056    #[doc = "index of debug variable"]
14057    pub ind: u8,
14058}
14059impl DEBUG_DATA {
14060    pub const ENCODED_LEN: usize = 9usize;
14061    pub const DEFAULT: Self = Self {
14062        time_boot_ms: 0_u32,
14063        value: 0.0_f32,
14064        ind: 0_u8,
14065    };
14066    #[cfg(feature = "arbitrary")]
14067    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14068        use arbitrary::{Arbitrary, Unstructured};
14069        let mut buf = [0u8; 1024];
14070        rng.fill_bytes(&mut buf);
14071        let mut unstructured = Unstructured::new(&buf);
14072        Self::arbitrary(&mut unstructured).unwrap_or_default()
14073    }
14074}
14075impl Default for DEBUG_DATA {
14076    fn default() -> Self {
14077        Self::DEFAULT.clone()
14078    }
14079}
14080impl MessageData for DEBUG_DATA {
14081    type Message = MavMessage;
14082    const ID: u32 = 254u32;
14083    const NAME: &'static str = "DEBUG";
14084    const EXTRA_CRC: u8 = 46u8;
14085    const ENCODED_LEN: usize = 9usize;
14086    fn deser(
14087        _version: MavlinkVersion,
14088        __input: &[u8],
14089    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14090        let avail_len = __input.len();
14091        let mut payload_buf = [0; Self::ENCODED_LEN];
14092        let mut buf = if avail_len < Self::ENCODED_LEN {
14093            payload_buf[0..avail_len].copy_from_slice(__input);
14094            Bytes::new(&payload_buf)
14095        } else {
14096            Bytes::new(__input)
14097        };
14098        let mut __struct = Self::default();
14099        __struct.time_boot_ms = buf.get_u32_le()?;
14100        __struct.value = buf.get_f32_le()?;
14101        __struct.ind = buf.get_u8()?;
14102        Ok(__struct)
14103    }
14104    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14105        let mut __tmp = BytesMut::new(bytes);
14106        #[allow(clippy::absurd_extreme_comparisons)]
14107        #[allow(unused_comparisons)]
14108        if __tmp.remaining() < Self::ENCODED_LEN {
14109            panic!(
14110                "buffer is too small (need {} bytes, but got {})",
14111                Self::ENCODED_LEN,
14112                __tmp.remaining(),
14113            )
14114        }
14115        __tmp.put_u32_le(self.time_boot_ms);
14116        __tmp.put_f32_le(self.value);
14117        __tmp.put_u8(self.ind);
14118        if matches!(version, MavlinkVersion::V2) {
14119            let len = __tmp.len();
14120            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14121        } else {
14122            __tmp.len()
14123        }
14124    }
14125}
14126#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
14127#[doc = ""]
14128#[doc = "ID: 350"]
14129#[derive(Debug, Clone, PartialEq)]
14130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14132#[cfg_attr(feature = "ts", derive(TS))]
14133#[cfg_attr(feature = "ts", ts(export))]
14134pub struct DEBUG_FLOAT_ARRAY_DATA {
14135    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14136    pub time_usec: u64,
14137    #[doc = "Unique ID used to discriminate between arrays"]
14138    pub array_id: u16,
14139    #[doc = "Name, for human-friendly display in a Ground Control Station"]
14140    #[cfg_attr(feature = "ts", ts(type = "string"))]
14141    pub name: CharArray<10>,
14142    #[doc = "data"]
14143    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14144    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14145    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14146    pub data: [f32; 58],
14147}
14148impl DEBUG_FLOAT_ARRAY_DATA {
14149    pub const ENCODED_LEN: usize = 252usize;
14150    pub const DEFAULT: Self = Self {
14151        time_usec: 0_u64,
14152        array_id: 0_u16,
14153        name: CharArray::new([0_u8; 10usize]),
14154        data: [0.0_f32; 58usize],
14155    };
14156    #[cfg(feature = "arbitrary")]
14157    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14158        use arbitrary::{Arbitrary, Unstructured};
14159        let mut buf = [0u8; 1024];
14160        rng.fill_bytes(&mut buf);
14161        let mut unstructured = Unstructured::new(&buf);
14162        Self::arbitrary(&mut unstructured).unwrap_or_default()
14163    }
14164}
14165impl Default for DEBUG_FLOAT_ARRAY_DATA {
14166    fn default() -> Self {
14167        Self::DEFAULT.clone()
14168    }
14169}
14170impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
14171    type Message = MavMessage;
14172    const ID: u32 = 350u32;
14173    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
14174    const EXTRA_CRC: u8 = 232u8;
14175    const ENCODED_LEN: usize = 252usize;
14176    fn deser(
14177        _version: MavlinkVersion,
14178        __input: &[u8],
14179    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14180        let avail_len = __input.len();
14181        let mut payload_buf = [0; Self::ENCODED_LEN];
14182        let mut buf = if avail_len < Self::ENCODED_LEN {
14183            payload_buf[0..avail_len].copy_from_slice(__input);
14184            Bytes::new(&payload_buf)
14185        } else {
14186            Bytes::new(__input)
14187        };
14188        let mut __struct = Self::default();
14189        __struct.time_usec = buf.get_u64_le()?;
14190        __struct.array_id = buf.get_u16_le()?;
14191        let mut tmp = [0_u8; 10usize];
14192        for v in &mut tmp {
14193            *v = buf.get_u8()?;
14194        }
14195        __struct.name = CharArray::new(tmp);
14196        for v in &mut __struct.data {
14197            let val = buf.get_f32_le()?;
14198            *v = val;
14199        }
14200        Ok(__struct)
14201    }
14202    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14203        let mut __tmp = BytesMut::new(bytes);
14204        #[allow(clippy::absurd_extreme_comparisons)]
14205        #[allow(unused_comparisons)]
14206        if __tmp.remaining() < Self::ENCODED_LEN {
14207            panic!(
14208                "buffer is too small (need {} bytes, but got {})",
14209                Self::ENCODED_LEN,
14210                __tmp.remaining(),
14211            )
14212        }
14213        __tmp.put_u64_le(self.time_usec);
14214        __tmp.put_u16_le(self.array_id);
14215        for val in &self.name {
14216            __tmp.put_u8(*val);
14217        }
14218        if matches!(version, MavlinkVersion::V2) {
14219            for val in &self.data {
14220                __tmp.put_f32_le(*val);
14221            }
14222            let len = __tmp.len();
14223            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14224        } else {
14225            __tmp.len()
14226        }
14227    }
14228}
14229#[doc = "To debug something using a named 3D vector."]
14230#[doc = ""]
14231#[doc = "ID: 250"]
14232#[derive(Debug, Clone, PartialEq)]
14233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14235#[cfg_attr(feature = "ts", derive(TS))]
14236#[cfg_attr(feature = "ts", ts(export))]
14237pub struct DEBUG_VECT_DATA {
14238    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14239    pub time_usec: u64,
14240    #[doc = "x"]
14241    pub x: f32,
14242    #[doc = "y"]
14243    pub y: f32,
14244    #[doc = "z"]
14245    pub z: f32,
14246    #[doc = "Name"]
14247    #[cfg_attr(feature = "ts", ts(type = "string"))]
14248    pub name: CharArray<10>,
14249}
14250impl DEBUG_VECT_DATA {
14251    pub const ENCODED_LEN: usize = 30usize;
14252    pub const DEFAULT: Self = Self {
14253        time_usec: 0_u64,
14254        x: 0.0_f32,
14255        y: 0.0_f32,
14256        z: 0.0_f32,
14257        name: CharArray::new([0_u8; 10usize]),
14258    };
14259    #[cfg(feature = "arbitrary")]
14260    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14261        use arbitrary::{Arbitrary, Unstructured};
14262        let mut buf = [0u8; 1024];
14263        rng.fill_bytes(&mut buf);
14264        let mut unstructured = Unstructured::new(&buf);
14265        Self::arbitrary(&mut unstructured).unwrap_or_default()
14266    }
14267}
14268impl Default for DEBUG_VECT_DATA {
14269    fn default() -> Self {
14270        Self::DEFAULT.clone()
14271    }
14272}
14273impl MessageData for DEBUG_VECT_DATA {
14274    type Message = MavMessage;
14275    const ID: u32 = 250u32;
14276    const NAME: &'static str = "DEBUG_VECT";
14277    const EXTRA_CRC: u8 = 49u8;
14278    const ENCODED_LEN: usize = 30usize;
14279    fn deser(
14280        _version: MavlinkVersion,
14281        __input: &[u8],
14282    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14283        let avail_len = __input.len();
14284        let mut payload_buf = [0; Self::ENCODED_LEN];
14285        let mut buf = if avail_len < Self::ENCODED_LEN {
14286            payload_buf[0..avail_len].copy_from_slice(__input);
14287            Bytes::new(&payload_buf)
14288        } else {
14289            Bytes::new(__input)
14290        };
14291        let mut __struct = Self::default();
14292        __struct.time_usec = buf.get_u64_le()?;
14293        __struct.x = buf.get_f32_le()?;
14294        __struct.y = buf.get_f32_le()?;
14295        __struct.z = buf.get_f32_le()?;
14296        let mut tmp = [0_u8; 10usize];
14297        for v in &mut tmp {
14298            *v = buf.get_u8()?;
14299        }
14300        __struct.name = CharArray::new(tmp);
14301        Ok(__struct)
14302    }
14303    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14304        let mut __tmp = BytesMut::new(bytes);
14305        #[allow(clippy::absurd_extreme_comparisons)]
14306        #[allow(unused_comparisons)]
14307        if __tmp.remaining() < Self::ENCODED_LEN {
14308            panic!(
14309                "buffer is too small (need {} bytes, but got {})",
14310                Self::ENCODED_LEN,
14311                __tmp.remaining(),
14312            )
14313        }
14314        __tmp.put_u64_le(self.time_usec);
14315        __tmp.put_f32_le(self.x);
14316        __tmp.put_f32_le(self.y);
14317        __tmp.put_f32_le(self.z);
14318        for val in &self.name {
14319            __tmp.put_u8(*val);
14320        }
14321        if matches!(version, MavlinkVersion::V2) {
14322            let len = __tmp.len();
14323            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14324        } else {
14325            __tmp.len()
14326        }
14327    }
14328}
14329#[doc = "Deepstall path planning."]
14330#[doc = ""]
14331#[doc = "ID: 195"]
14332#[derive(Debug, Clone, PartialEq)]
14333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14335#[cfg_attr(feature = "ts", derive(TS))]
14336#[cfg_attr(feature = "ts", ts(export))]
14337pub struct DEEPSTALL_DATA {
14338    #[doc = "Landing latitude."]
14339    pub landing_lat: i32,
14340    #[doc = "Landing longitude."]
14341    pub landing_lon: i32,
14342    #[doc = "Final heading start point, latitude."]
14343    pub path_lat: i32,
14344    #[doc = "Final heading start point, longitude."]
14345    pub path_lon: i32,
14346    #[doc = "Arc entry point, latitude."]
14347    pub arc_entry_lat: i32,
14348    #[doc = "Arc entry point, longitude."]
14349    pub arc_entry_lon: i32,
14350    #[doc = "Altitude."]
14351    pub altitude: f32,
14352    #[doc = "Distance the aircraft expects to travel during the deepstall."]
14353    pub expected_travel_distance: f32,
14354    #[doc = "Deepstall cross track error (only valid when in DEEPSTALL_STAGE_LAND)."]
14355    pub cross_track_error: f32,
14356    #[doc = "Deepstall stage."]
14357    pub stage: DeepstallStage,
14358}
14359impl DEEPSTALL_DATA {
14360    pub const ENCODED_LEN: usize = 37usize;
14361    pub const DEFAULT: Self = Self {
14362        landing_lat: 0_i32,
14363        landing_lon: 0_i32,
14364        path_lat: 0_i32,
14365        path_lon: 0_i32,
14366        arc_entry_lat: 0_i32,
14367        arc_entry_lon: 0_i32,
14368        altitude: 0.0_f32,
14369        expected_travel_distance: 0.0_f32,
14370        cross_track_error: 0.0_f32,
14371        stage: DeepstallStage::DEFAULT,
14372    };
14373    #[cfg(feature = "arbitrary")]
14374    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14375        use arbitrary::{Arbitrary, Unstructured};
14376        let mut buf = [0u8; 1024];
14377        rng.fill_bytes(&mut buf);
14378        let mut unstructured = Unstructured::new(&buf);
14379        Self::arbitrary(&mut unstructured).unwrap_or_default()
14380    }
14381}
14382impl Default for DEEPSTALL_DATA {
14383    fn default() -> Self {
14384        Self::DEFAULT.clone()
14385    }
14386}
14387impl MessageData for DEEPSTALL_DATA {
14388    type Message = MavMessage;
14389    const ID: u32 = 195u32;
14390    const NAME: &'static str = "DEEPSTALL";
14391    const EXTRA_CRC: u8 = 120u8;
14392    const ENCODED_LEN: usize = 37usize;
14393    fn deser(
14394        _version: MavlinkVersion,
14395        __input: &[u8],
14396    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14397        let avail_len = __input.len();
14398        let mut payload_buf = [0; Self::ENCODED_LEN];
14399        let mut buf = if avail_len < Self::ENCODED_LEN {
14400            payload_buf[0..avail_len].copy_from_slice(__input);
14401            Bytes::new(&payload_buf)
14402        } else {
14403            Bytes::new(__input)
14404        };
14405        let mut __struct = Self::default();
14406        __struct.landing_lat = buf.get_i32_le()?;
14407        __struct.landing_lon = buf.get_i32_le()?;
14408        __struct.path_lat = buf.get_i32_le()?;
14409        __struct.path_lon = buf.get_i32_le()?;
14410        __struct.arc_entry_lat = buf.get_i32_le()?;
14411        __struct.arc_entry_lon = buf.get_i32_le()?;
14412        __struct.altitude = buf.get_f32_le()?;
14413        __struct.expected_travel_distance = buf.get_f32_le()?;
14414        __struct.cross_track_error = buf.get_f32_le()?;
14415        let tmp = buf.get_u8()?;
14416        __struct.stage =
14417            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14418                enum_type: "DeepstallStage",
14419                value: tmp as u64,
14420            })?;
14421        Ok(__struct)
14422    }
14423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14424        let mut __tmp = BytesMut::new(bytes);
14425        #[allow(clippy::absurd_extreme_comparisons)]
14426        #[allow(unused_comparisons)]
14427        if __tmp.remaining() < Self::ENCODED_LEN {
14428            panic!(
14429                "buffer is too small (need {} bytes, but got {})",
14430                Self::ENCODED_LEN,
14431                __tmp.remaining(),
14432            )
14433        }
14434        __tmp.put_i32_le(self.landing_lat);
14435        __tmp.put_i32_le(self.landing_lon);
14436        __tmp.put_i32_le(self.path_lat);
14437        __tmp.put_i32_le(self.path_lon);
14438        __tmp.put_i32_le(self.arc_entry_lat);
14439        __tmp.put_i32_le(self.arc_entry_lon);
14440        __tmp.put_f32_le(self.altitude);
14441        __tmp.put_f32_le(self.expected_travel_distance);
14442        __tmp.put_f32_le(self.cross_track_error);
14443        __tmp.put_u8(self.stage as u8);
14444        if matches!(version, MavlinkVersion::V2) {
14445            let len = __tmp.len();
14446            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14447        } else {
14448            __tmp.len()
14449        }
14450    }
14451}
14452#[doc = "Read registers for a device."]
14453#[doc = ""]
14454#[doc = "ID: 11000"]
14455#[derive(Debug, Clone, PartialEq)]
14456#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14457#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14458#[cfg_attr(feature = "ts", derive(TS))]
14459#[cfg_attr(feature = "ts", ts(export))]
14460pub struct DEVICE_OP_READ_DATA {
14461    #[doc = "Request ID - copied to reply."]
14462    pub request_id: u32,
14463    #[doc = "System ID."]
14464    pub target_system: u8,
14465    #[doc = "Component ID."]
14466    pub target_component: u8,
14467    #[doc = "The bus type."]
14468    pub bustype: DeviceOpBustype,
14469    #[doc = "Bus number."]
14470    pub bus: u8,
14471    #[doc = "Bus address."]
14472    pub address: u8,
14473    #[doc = "Name of device on bus (for SPI)."]
14474    #[cfg_attr(feature = "ts", ts(type = "string"))]
14475    pub busname: CharArray<40>,
14476    #[doc = "First register to read."]
14477    pub regstart: u8,
14478    #[doc = "Count of registers to read."]
14479    pub count: u8,
14480    #[doc = "Bank number."]
14481    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14482    pub bank: u8,
14483}
14484impl DEVICE_OP_READ_DATA {
14485    pub const ENCODED_LEN: usize = 52usize;
14486    pub const DEFAULT: Self = Self {
14487        request_id: 0_u32,
14488        target_system: 0_u8,
14489        target_component: 0_u8,
14490        bustype: DeviceOpBustype::DEFAULT,
14491        bus: 0_u8,
14492        address: 0_u8,
14493        busname: CharArray::new([0_u8; 40usize]),
14494        regstart: 0_u8,
14495        count: 0_u8,
14496        bank: 0_u8,
14497    };
14498    #[cfg(feature = "arbitrary")]
14499    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14500        use arbitrary::{Arbitrary, Unstructured};
14501        let mut buf = [0u8; 1024];
14502        rng.fill_bytes(&mut buf);
14503        let mut unstructured = Unstructured::new(&buf);
14504        Self::arbitrary(&mut unstructured).unwrap_or_default()
14505    }
14506}
14507impl Default for DEVICE_OP_READ_DATA {
14508    fn default() -> Self {
14509        Self::DEFAULT.clone()
14510    }
14511}
14512impl MessageData for DEVICE_OP_READ_DATA {
14513    type Message = MavMessage;
14514    const ID: u32 = 11000u32;
14515    const NAME: &'static str = "DEVICE_OP_READ";
14516    const EXTRA_CRC: u8 = 134u8;
14517    const ENCODED_LEN: usize = 52usize;
14518    fn deser(
14519        _version: MavlinkVersion,
14520        __input: &[u8],
14521    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14522        let avail_len = __input.len();
14523        let mut payload_buf = [0; Self::ENCODED_LEN];
14524        let mut buf = if avail_len < Self::ENCODED_LEN {
14525            payload_buf[0..avail_len].copy_from_slice(__input);
14526            Bytes::new(&payload_buf)
14527        } else {
14528            Bytes::new(__input)
14529        };
14530        let mut __struct = Self::default();
14531        __struct.request_id = buf.get_u32_le()?;
14532        __struct.target_system = buf.get_u8()?;
14533        __struct.target_component = buf.get_u8()?;
14534        let tmp = buf.get_u8()?;
14535        __struct.bustype =
14536            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14537                enum_type: "DeviceOpBustype",
14538                value: tmp as u64,
14539            })?;
14540        __struct.bus = buf.get_u8()?;
14541        __struct.address = buf.get_u8()?;
14542        let mut tmp = [0_u8; 40usize];
14543        for v in &mut tmp {
14544            *v = buf.get_u8()?;
14545        }
14546        __struct.busname = CharArray::new(tmp);
14547        __struct.regstart = buf.get_u8()?;
14548        __struct.count = buf.get_u8()?;
14549        __struct.bank = buf.get_u8()?;
14550        Ok(__struct)
14551    }
14552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14553        let mut __tmp = BytesMut::new(bytes);
14554        #[allow(clippy::absurd_extreme_comparisons)]
14555        #[allow(unused_comparisons)]
14556        if __tmp.remaining() < Self::ENCODED_LEN {
14557            panic!(
14558                "buffer is too small (need {} bytes, but got {})",
14559                Self::ENCODED_LEN,
14560                __tmp.remaining(),
14561            )
14562        }
14563        __tmp.put_u32_le(self.request_id);
14564        __tmp.put_u8(self.target_system);
14565        __tmp.put_u8(self.target_component);
14566        __tmp.put_u8(self.bustype as u8);
14567        __tmp.put_u8(self.bus);
14568        __tmp.put_u8(self.address);
14569        for val in &self.busname {
14570            __tmp.put_u8(*val);
14571        }
14572        __tmp.put_u8(self.regstart);
14573        __tmp.put_u8(self.count);
14574        if matches!(version, MavlinkVersion::V2) {
14575            __tmp.put_u8(self.bank);
14576            let len = __tmp.len();
14577            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14578        } else {
14579            __tmp.len()
14580        }
14581    }
14582}
14583#[doc = "Read registers reply."]
14584#[doc = ""]
14585#[doc = "ID: 11001"]
14586#[derive(Debug, Clone, PartialEq)]
14587#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14588#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14589#[cfg_attr(feature = "ts", derive(TS))]
14590#[cfg_attr(feature = "ts", ts(export))]
14591pub struct DEVICE_OP_READ_REPLY_DATA {
14592    #[doc = "Request ID - copied from request."]
14593    pub request_id: u32,
14594    #[doc = "0 for success, anything else is failure code."]
14595    pub result: u8,
14596    #[doc = "Starting register."]
14597    pub regstart: u8,
14598    #[doc = "Count of bytes read."]
14599    pub count: u8,
14600    #[doc = "Reply data."]
14601    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14602    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14603    pub data: [u8; 128],
14604    #[doc = "Bank number."]
14605    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14606    pub bank: u8,
14607}
14608impl DEVICE_OP_READ_REPLY_DATA {
14609    pub const ENCODED_LEN: usize = 136usize;
14610    pub const DEFAULT: Self = Self {
14611        request_id: 0_u32,
14612        result: 0_u8,
14613        regstart: 0_u8,
14614        count: 0_u8,
14615        data: [0_u8; 128usize],
14616        bank: 0_u8,
14617    };
14618    #[cfg(feature = "arbitrary")]
14619    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14620        use arbitrary::{Arbitrary, Unstructured};
14621        let mut buf = [0u8; 1024];
14622        rng.fill_bytes(&mut buf);
14623        let mut unstructured = Unstructured::new(&buf);
14624        Self::arbitrary(&mut unstructured).unwrap_or_default()
14625    }
14626}
14627impl Default for DEVICE_OP_READ_REPLY_DATA {
14628    fn default() -> Self {
14629        Self::DEFAULT.clone()
14630    }
14631}
14632impl MessageData for DEVICE_OP_READ_REPLY_DATA {
14633    type Message = MavMessage;
14634    const ID: u32 = 11001u32;
14635    const NAME: &'static str = "DEVICE_OP_READ_REPLY";
14636    const EXTRA_CRC: u8 = 15u8;
14637    const ENCODED_LEN: usize = 136usize;
14638    fn deser(
14639        _version: MavlinkVersion,
14640        __input: &[u8],
14641    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14642        let avail_len = __input.len();
14643        let mut payload_buf = [0; Self::ENCODED_LEN];
14644        let mut buf = if avail_len < Self::ENCODED_LEN {
14645            payload_buf[0..avail_len].copy_from_slice(__input);
14646            Bytes::new(&payload_buf)
14647        } else {
14648            Bytes::new(__input)
14649        };
14650        let mut __struct = Self::default();
14651        __struct.request_id = buf.get_u32_le()?;
14652        __struct.result = buf.get_u8()?;
14653        __struct.regstart = buf.get_u8()?;
14654        __struct.count = buf.get_u8()?;
14655        for v in &mut __struct.data {
14656            let val = buf.get_u8()?;
14657            *v = val;
14658        }
14659        __struct.bank = buf.get_u8()?;
14660        Ok(__struct)
14661    }
14662    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14663        let mut __tmp = BytesMut::new(bytes);
14664        #[allow(clippy::absurd_extreme_comparisons)]
14665        #[allow(unused_comparisons)]
14666        if __tmp.remaining() < Self::ENCODED_LEN {
14667            panic!(
14668                "buffer is too small (need {} bytes, but got {})",
14669                Self::ENCODED_LEN,
14670                __tmp.remaining(),
14671            )
14672        }
14673        __tmp.put_u32_le(self.request_id);
14674        __tmp.put_u8(self.result);
14675        __tmp.put_u8(self.regstart);
14676        __tmp.put_u8(self.count);
14677        for val in &self.data {
14678            __tmp.put_u8(*val);
14679        }
14680        if matches!(version, MavlinkVersion::V2) {
14681            __tmp.put_u8(self.bank);
14682            let len = __tmp.len();
14683            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14684        } else {
14685            __tmp.len()
14686        }
14687    }
14688}
14689#[doc = "Write registers for a device."]
14690#[doc = ""]
14691#[doc = "ID: 11002"]
14692#[derive(Debug, Clone, PartialEq)]
14693#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14694#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14695#[cfg_attr(feature = "ts", derive(TS))]
14696#[cfg_attr(feature = "ts", ts(export))]
14697pub struct DEVICE_OP_WRITE_DATA {
14698    #[doc = "Request ID - copied to reply."]
14699    pub request_id: u32,
14700    #[doc = "System ID."]
14701    pub target_system: u8,
14702    #[doc = "Component ID."]
14703    pub target_component: u8,
14704    #[doc = "The bus type."]
14705    pub bustype: DeviceOpBustype,
14706    #[doc = "Bus number."]
14707    pub bus: u8,
14708    #[doc = "Bus address."]
14709    pub address: u8,
14710    #[doc = "Name of device on bus (for SPI)."]
14711    #[cfg_attr(feature = "ts", ts(type = "string"))]
14712    pub busname: CharArray<40>,
14713    #[doc = "First register to write."]
14714    pub regstart: u8,
14715    #[doc = "Count of registers to write."]
14716    pub count: u8,
14717    #[doc = "Write data."]
14718    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14719    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14720    pub data: [u8; 128],
14721    #[doc = "Bank number."]
14722    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14723    pub bank: u8,
14724}
14725impl DEVICE_OP_WRITE_DATA {
14726    pub const ENCODED_LEN: usize = 180usize;
14727    pub const DEFAULT: Self = Self {
14728        request_id: 0_u32,
14729        target_system: 0_u8,
14730        target_component: 0_u8,
14731        bustype: DeviceOpBustype::DEFAULT,
14732        bus: 0_u8,
14733        address: 0_u8,
14734        busname: CharArray::new([0_u8; 40usize]),
14735        regstart: 0_u8,
14736        count: 0_u8,
14737        data: [0_u8; 128usize],
14738        bank: 0_u8,
14739    };
14740    #[cfg(feature = "arbitrary")]
14741    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14742        use arbitrary::{Arbitrary, Unstructured};
14743        let mut buf = [0u8; 1024];
14744        rng.fill_bytes(&mut buf);
14745        let mut unstructured = Unstructured::new(&buf);
14746        Self::arbitrary(&mut unstructured).unwrap_or_default()
14747    }
14748}
14749impl Default for DEVICE_OP_WRITE_DATA {
14750    fn default() -> Self {
14751        Self::DEFAULT.clone()
14752    }
14753}
14754impl MessageData for DEVICE_OP_WRITE_DATA {
14755    type Message = MavMessage;
14756    const ID: u32 = 11002u32;
14757    const NAME: &'static str = "DEVICE_OP_WRITE";
14758    const EXTRA_CRC: u8 = 234u8;
14759    const ENCODED_LEN: usize = 180usize;
14760    fn deser(
14761        _version: MavlinkVersion,
14762        __input: &[u8],
14763    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14764        let avail_len = __input.len();
14765        let mut payload_buf = [0; Self::ENCODED_LEN];
14766        let mut buf = if avail_len < Self::ENCODED_LEN {
14767            payload_buf[0..avail_len].copy_from_slice(__input);
14768            Bytes::new(&payload_buf)
14769        } else {
14770            Bytes::new(__input)
14771        };
14772        let mut __struct = Self::default();
14773        __struct.request_id = buf.get_u32_le()?;
14774        __struct.target_system = buf.get_u8()?;
14775        __struct.target_component = buf.get_u8()?;
14776        let tmp = buf.get_u8()?;
14777        __struct.bustype =
14778            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14779                enum_type: "DeviceOpBustype",
14780                value: tmp as u64,
14781            })?;
14782        __struct.bus = buf.get_u8()?;
14783        __struct.address = buf.get_u8()?;
14784        let mut tmp = [0_u8; 40usize];
14785        for v in &mut tmp {
14786            *v = buf.get_u8()?;
14787        }
14788        __struct.busname = CharArray::new(tmp);
14789        __struct.regstart = buf.get_u8()?;
14790        __struct.count = buf.get_u8()?;
14791        for v in &mut __struct.data {
14792            let val = buf.get_u8()?;
14793            *v = val;
14794        }
14795        __struct.bank = buf.get_u8()?;
14796        Ok(__struct)
14797    }
14798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14799        let mut __tmp = BytesMut::new(bytes);
14800        #[allow(clippy::absurd_extreme_comparisons)]
14801        #[allow(unused_comparisons)]
14802        if __tmp.remaining() < Self::ENCODED_LEN {
14803            panic!(
14804                "buffer is too small (need {} bytes, but got {})",
14805                Self::ENCODED_LEN,
14806                __tmp.remaining(),
14807            )
14808        }
14809        __tmp.put_u32_le(self.request_id);
14810        __tmp.put_u8(self.target_system);
14811        __tmp.put_u8(self.target_component);
14812        __tmp.put_u8(self.bustype as u8);
14813        __tmp.put_u8(self.bus);
14814        __tmp.put_u8(self.address);
14815        for val in &self.busname {
14816            __tmp.put_u8(*val);
14817        }
14818        __tmp.put_u8(self.regstart);
14819        __tmp.put_u8(self.count);
14820        for val in &self.data {
14821            __tmp.put_u8(*val);
14822        }
14823        if matches!(version, MavlinkVersion::V2) {
14824            __tmp.put_u8(self.bank);
14825            let len = __tmp.len();
14826            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14827        } else {
14828            __tmp.len()
14829        }
14830    }
14831}
14832#[doc = "Write registers reply."]
14833#[doc = ""]
14834#[doc = "ID: 11003"]
14835#[derive(Debug, Clone, PartialEq)]
14836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14837#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14838#[cfg_attr(feature = "ts", derive(TS))]
14839#[cfg_attr(feature = "ts", ts(export))]
14840pub struct DEVICE_OP_WRITE_REPLY_DATA {
14841    #[doc = "Request ID - copied from request."]
14842    pub request_id: u32,
14843    #[doc = "0 for success, anything else is failure code."]
14844    pub result: u8,
14845}
14846impl DEVICE_OP_WRITE_REPLY_DATA {
14847    pub const ENCODED_LEN: usize = 5usize;
14848    pub const DEFAULT: Self = Self {
14849        request_id: 0_u32,
14850        result: 0_u8,
14851    };
14852    #[cfg(feature = "arbitrary")]
14853    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14854        use arbitrary::{Arbitrary, Unstructured};
14855        let mut buf = [0u8; 1024];
14856        rng.fill_bytes(&mut buf);
14857        let mut unstructured = Unstructured::new(&buf);
14858        Self::arbitrary(&mut unstructured).unwrap_or_default()
14859    }
14860}
14861impl Default for DEVICE_OP_WRITE_REPLY_DATA {
14862    fn default() -> Self {
14863        Self::DEFAULT.clone()
14864    }
14865}
14866impl MessageData for DEVICE_OP_WRITE_REPLY_DATA {
14867    type Message = MavMessage;
14868    const ID: u32 = 11003u32;
14869    const NAME: &'static str = "DEVICE_OP_WRITE_REPLY";
14870    const EXTRA_CRC: u8 = 64u8;
14871    const ENCODED_LEN: usize = 5usize;
14872    fn deser(
14873        _version: MavlinkVersion,
14874        __input: &[u8],
14875    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14876        let avail_len = __input.len();
14877        let mut payload_buf = [0; Self::ENCODED_LEN];
14878        let mut buf = if avail_len < Self::ENCODED_LEN {
14879            payload_buf[0..avail_len].copy_from_slice(__input);
14880            Bytes::new(&payload_buf)
14881        } else {
14882            Bytes::new(__input)
14883        };
14884        let mut __struct = Self::default();
14885        __struct.request_id = buf.get_u32_le()?;
14886        __struct.result = buf.get_u8()?;
14887        Ok(__struct)
14888    }
14889    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14890        let mut __tmp = BytesMut::new(bytes);
14891        #[allow(clippy::absurd_extreme_comparisons)]
14892        #[allow(unused_comparisons)]
14893        if __tmp.remaining() < Self::ENCODED_LEN {
14894            panic!(
14895                "buffer is too small (need {} bytes, but got {})",
14896                Self::ENCODED_LEN,
14897                __tmp.remaining(),
14898            )
14899        }
14900        __tmp.put_u32_le(self.request_id);
14901        __tmp.put_u8(self.result);
14902        if matches!(version, MavlinkVersion::V2) {
14903            let len = __tmp.len();
14904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14905        } else {
14906            __tmp.len()
14907        }
14908    }
14909}
14910#[doc = "Configure on-board Camera Control System."]
14911#[doc = ""]
14912#[doc = "ID: 154"]
14913#[derive(Debug, Clone, PartialEq)]
14914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14916#[cfg_attr(feature = "ts", derive(TS))]
14917#[cfg_attr(feature = "ts", ts(export))]
14918pub struct DIGICAM_CONFIGURE_DATA {
14919    #[doc = "Correspondent value to given extra_param."]
14920    pub extra_value: f32,
14921    #[doc = "Divisor number //e.g. 1000 means 1/1000 (0 means ignore)."]
14922    pub shutter_speed: u16,
14923    #[doc = "System ID."]
14924    pub target_system: u8,
14925    #[doc = "Component ID."]
14926    pub target_component: u8,
14927    #[doc = "Mode enumeration from 1 to N //P, TV, AV, M, etc. (0 means ignore)."]
14928    pub mode: u8,
14929    #[doc = "F stop number x 10 //e.g. 28 means 2.8 (0 means ignore)."]
14930    pub aperture: u8,
14931    #[doc = "ISO enumeration from 1 to N //e.g. 80, 100, 200, Etc (0 means ignore)."]
14932    pub iso: u8,
14933    #[doc = "Exposure type enumeration from 1 to N (0 means ignore)."]
14934    pub exposure_type: u8,
14935    #[doc = "Command Identity (incremental loop: 0 to 255). //A command sent multiple times will be executed or pooled just once."]
14936    pub command_id: u8,
14937    #[doc = "Main engine cut-off time before camera trigger (0 means no cut-off)."]
14938    pub engine_cut_off: u8,
14939    #[doc = "Extra parameters enumeration (0 means ignore)."]
14940    pub extra_param: u8,
14941}
14942impl DIGICAM_CONFIGURE_DATA {
14943    pub const ENCODED_LEN: usize = 15usize;
14944    pub const DEFAULT: Self = Self {
14945        extra_value: 0.0_f32,
14946        shutter_speed: 0_u16,
14947        target_system: 0_u8,
14948        target_component: 0_u8,
14949        mode: 0_u8,
14950        aperture: 0_u8,
14951        iso: 0_u8,
14952        exposure_type: 0_u8,
14953        command_id: 0_u8,
14954        engine_cut_off: 0_u8,
14955        extra_param: 0_u8,
14956    };
14957    #[cfg(feature = "arbitrary")]
14958    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14959        use arbitrary::{Arbitrary, Unstructured};
14960        let mut buf = [0u8; 1024];
14961        rng.fill_bytes(&mut buf);
14962        let mut unstructured = Unstructured::new(&buf);
14963        Self::arbitrary(&mut unstructured).unwrap_or_default()
14964    }
14965}
14966impl Default for DIGICAM_CONFIGURE_DATA {
14967    fn default() -> Self {
14968        Self::DEFAULT.clone()
14969    }
14970}
14971impl MessageData for DIGICAM_CONFIGURE_DATA {
14972    type Message = MavMessage;
14973    const ID: u32 = 154u32;
14974    const NAME: &'static str = "DIGICAM_CONFIGURE";
14975    const EXTRA_CRC: u8 = 84u8;
14976    const ENCODED_LEN: usize = 15usize;
14977    fn deser(
14978        _version: MavlinkVersion,
14979        __input: &[u8],
14980    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14981        let avail_len = __input.len();
14982        let mut payload_buf = [0; Self::ENCODED_LEN];
14983        let mut buf = if avail_len < Self::ENCODED_LEN {
14984            payload_buf[0..avail_len].copy_from_slice(__input);
14985            Bytes::new(&payload_buf)
14986        } else {
14987            Bytes::new(__input)
14988        };
14989        let mut __struct = Self::default();
14990        __struct.extra_value = buf.get_f32_le()?;
14991        __struct.shutter_speed = buf.get_u16_le()?;
14992        __struct.target_system = buf.get_u8()?;
14993        __struct.target_component = buf.get_u8()?;
14994        __struct.mode = buf.get_u8()?;
14995        __struct.aperture = buf.get_u8()?;
14996        __struct.iso = buf.get_u8()?;
14997        __struct.exposure_type = buf.get_u8()?;
14998        __struct.command_id = buf.get_u8()?;
14999        __struct.engine_cut_off = buf.get_u8()?;
15000        __struct.extra_param = buf.get_u8()?;
15001        Ok(__struct)
15002    }
15003    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15004        let mut __tmp = BytesMut::new(bytes);
15005        #[allow(clippy::absurd_extreme_comparisons)]
15006        #[allow(unused_comparisons)]
15007        if __tmp.remaining() < Self::ENCODED_LEN {
15008            panic!(
15009                "buffer is too small (need {} bytes, but got {})",
15010                Self::ENCODED_LEN,
15011                __tmp.remaining(),
15012            )
15013        }
15014        __tmp.put_f32_le(self.extra_value);
15015        __tmp.put_u16_le(self.shutter_speed);
15016        __tmp.put_u8(self.target_system);
15017        __tmp.put_u8(self.target_component);
15018        __tmp.put_u8(self.mode);
15019        __tmp.put_u8(self.aperture);
15020        __tmp.put_u8(self.iso);
15021        __tmp.put_u8(self.exposure_type);
15022        __tmp.put_u8(self.command_id);
15023        __tmp.put_u8(self.engine_cut_off);
15024        __tmp.put_u8(self.extra_param);
15025        if matches!(version, MavlinkVersion::V2) {
15026            let len = __tmp.len();
15027            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15028        } else {
15029            __tmp.len()
15030        }
15031    }
15032}
15033#[doc = "Control on-board Camera Control System to take shots."]
15034#[doc = ""]
15035#[doc = "ID: 155"]
15036#[derive(Debug, Clone, PartialEq)]
15037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15039#[cfg_attr(feature = "ts", derive(TS))]
15040#[cfg_attr(feature = "ts", ts(export))]
15041pub struct DIGICAM_CONTROL_DATA {
15042    #[doc = "Correspondent value to given extra_param."]
15043    pub extra_value: f32,
15044    #[doc = "System ID."]
15045    pub target_system: u8,
15046    #[doc = "Component ID."]
15047    pub target_component: u8,
15048    #[doc = "0: stop, 1: start or keep it up //Session control e.g. show/hide lens."]
15049    pub session: u8,
15050    #[doc = "1 to N //Zoom's absolute position (0 means ignore)."]
15051    pub zoom_pos: u8,
15052    #[doc = "-100 to 100 //Zooming step value to offset zoom from the current position."]
15053    pub zoom_step: i8,
15054    #[doc = "0: unlock focus or keep unlocked, 1: lock focus or keep locked, 3: re-lock focus."]
15055    pub focus_lock: u8,
15056    #[doc = "0: ignore, 1: shot or start filming."]
15057    pub shot: u8,
15058    #[doc = "Command Identity (incremental loop: 0 to 255)//A command sent multiple times will be executed or pooled just once."]
15059    pub command_id: u8,
15060    #[doc = "Extra parameters enumeration (0 means ignore)."]
15061    pub extra_param: u8,
15062}
15063impl DIGICAM_CONTROL_DATA {
15064    pub const ENCODED_LEN: usize = 13usize;
15065    pub const DEFAULT: Self = Self {
15066        extra_value: 0.0_f32,
15067        target_system: 0_u8,
15068        target_component: 0_u8,
15069        session: 0_u8,
15070        zoom_pos: 0_u8,
15071        zoom_step: 0_i8,
15072        focus_lock: 0_u8,
15073        shot: 0_u8,
15074        command_id: 0_u8,
15075        extra_param: 0_u8,
15076    };
15077    #[cfg(feature = "arbitrary")]
15078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15079        use arbitrary::{Arbitrary, Unstructured};
15080        let mut buf = [0u8; 1024];
15081        rng.fill_bytes(&mut buf);
15082        let mut unstructured = Unstructured::new(&buf);
15083        Self::arbitrary(&mut unstructured).unwrap_or_default()
15084    }
15085}
15086impl Default for DIGICAM_CONTROL_DATA {
15087    fn default() -> Self {
15088        Self::DEFAULT.clone()
15089    }
15090}
15091impl MessageData for DIGICAM_CONTROL_DATA {
15092    type Message = MavMessage;
15093    const ID: u32 = 155u32;
15094    const NAME: &'static str = "DIGICAM_CONTROL";
15095    const EXTRA_CRC: u8 = 22u8;
15096    const ENCODED_LEN: usize = 13usize;
15097    fn deser(
15098        _version: MavlinkVersion,
15099        __input: &[u8],
15100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15101        let avail_len = __input.len();
15102        let mut payload_buf = [0; Self::ENCODED_LEN];
15103        let mut buf = if avail_len < Self::ENCODED_LEN {
15104            payload_buf[0..avail_len].copy_from_slice(__input);
15105            Bytes::new(&payload_buf)
15106        } else {
15107            Bytes::new(__input)
15108        };
15109        let mut __struct = Self::default();
15110        __struct.extra_value = buf.get_f32_le()?;
15111        __struct.target_system = buf.get_u8()?;
15112        __struct.target_component = buf.get_u8()?;
15113        __struct.session = buf.get_u8()?;
15114        __struct.zoom_pos = buf.get_u8()?;
15115        __struct.zoom_step = buf.get_i8()?;
15116        __struct.focus_lock = buf.get_u8()?;
15117        __struct.shot = buf.get_u8()?;
15118        __struct.command_id = buf.get_u8()?;
15119        __struct.extra_param = buf.get_u8()?;
15120        Ok(__struct)
15121    }
15122    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15123        let mut __tmp = BytesMut::new(bytes);
15124        #[allow(clippy::absurd_extreme_comparisons)]
15125        #[allow(unused_comparisons)]
15126        if __tmp.remaining() < Self::ENCODED_LEN {
15127            panic!(
15128                "buffer is too small (need {} bytes, but got {})",
15129                Self::ENCODED_LEN,
15130                __tmp.remaining(),
15131            )
15132        }
15133        __tmp.put_f32_le(self.extra_value);
15134        __tmp.put_u8(self.target_system);
15135        __tmp.put_u8(self.target_component);
15136        __tmp.put_u8(self.session);
15137        __tmp.put_u8(self.zoom_pos);
15138        __tmp.put_i8(self.zoom_step);
15139        __tmp.put_u8(self.focus_lock);
15140        __tmp.put_u8(self.shot);
15141        __tmp.put_u8(self.command_id);
15142        __tmp.put_u8(self.extra_param);
15143        if matches!(version, MavlinkVersion::V2) {
15144            let len = __tmp.len();
15145            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15146        } else {
15147            __tmp.len()
15148        }
15149    }
15150}
15151#[doc = "Distance sensor information for an onboard rangefinder."]
15152#[doc = ""]
15153#[doc = "ID: 132"]
15154#[derive(Debug, Clone, PartialEq)]
15155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15157#[cfg_attr(feature = "ts", derive(TS))]
15158#[cfg_attr(feature = "ts", ts(export))]
15159pub struct DISTANCE_SENSOR_DATA {
15160    #[doc = "Timestamp (time since system boot)."]
15161    pub time_boot_ms: u32,
15162    #[doc = "Minimum distance the sensor can measure"]
15163    pub min_distance: u16,
15164    #[doc = "Maximum distance the sensor can measure"]
15165    pub max_distance: u16,
15166    #[doc = "Current distance reading"]
15167    pub current_distance: u16,
15168    #[doc = "Type of distance sensor."]
15169    pub mavtype: MavDistanceSensor,
15170    #[doc = "Onboard ID of the sensor"]
15171    pub id: u8,
15172    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
15173    pub orientation: MavSensorOrientation,
15174    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
15175    pub covariance: u8,
15176    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
15177    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15178    pub horizontal_fov: f32,
15179    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
15180    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15181    pub vertical_fov: f32,
15182    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
15183    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15184    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15185    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15186    pub quaternion: [f32; 4],
15187    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
15188    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15189    pub signal_quality: u8,
15190}
15191impl DISTANCE_SENSOR_DATA {
15192    pub const ENCODED_LEN: usize = 39usize;
15193    pub const DEFAULT: Self = Self {
15194        time_boot_ms: 0_u32,
15195        min_distance: 0_u16,
15196        max_distance: 0_u16,
15197        current_distance: 0_u16,
15198        mavtype: MavDistanceSensor::DEFAULT,
15199        id: 0_u8,
15200        orientation: MavSensorOrientation::DEFAULT,
15201        covariance: 0_u8,
15202        horizontal_fov: 0.0_f32,
15203        vertical_fov: 0.0_f32,
15204        quaternion: [0.0_f32; 4usize],
15205        signal_quality: 0_u8,
15206    };
15207    #[cfg(feature = "arbitrary")]
15208    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15209        use arbitrary::{Arbitrary, Unstructured};
15210        let mut buf = [0u8; 1024];
15211        rng.fill_bytes(&mut buf);
15212        let mut unstructured = Unstructured::new(&buf);
15213        Self::arbitrary(&mut unstructured).unwrap_or_default()
15214    }
15215}
15216impl Default for DISTANCE_SENSOR_DATA {
15217    fn default() -> Self {
15218        Self::DEFAULT.clone()
15219    }
15220}
15221impl MessageData for DISTANCE_SENSOR_DATA {
15222    type Message = MavMessage;
15223    const ID: u32 = 132u32;
15224    const NAME: &'static str = "DISTANCE_SENSOR";
15225    const EXTRA_CRC: u8 = 85u8;
15226    const ENCODED_LEN: usize = 39usize;
15227    fn deser(
15228        _version: MavlinkVersion,
15229        __input: &[u8],
15230    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15231        let avail_len = __input.len();
15232        let mut payload_buf = [0; Self::ENCODED_LEN];
15233        let mut buf = if avail_len < Self::ENCODED_LEN {
15234            payload_buf[0..avail_len].copy_from_slice(__input);
15235            Bytes::new(&payload_buf)
15236        } else {
15237            Bytes::new(__input)
15238        };
15239        let mut __struct = Self::default();
15240        __struct.time_boot_ms = buf.get_u32_le()?;
15241        __struct.min_distance = buf.get_u16_le()?;
15242        __struct.max_distance = buf.get_u16_le()?;
15243        __struct.current_distance = buf.get_u16_le()?;
15244        let tmp = buf.get_u8()?;
15245        __struct.mavtype =
15246            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15247                enum_type: "MavDistanceSensor",
15248                value: tmp as u64,
15249            })?;
15250        __struct.id = buf.get_u8()?;
15251        let tmp = buf.get_u8()?;
15252        __struct.orientation =
15253            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15254                enum_type: "MavSensorOrientation",
15255                value: tmp as u64,
15256            })?;
15257        __struct.covariance = buf.get_u8()?;
15258        __struct.horizontal_fov = buf.get_f32_le()?;
15259        __struct.vertical_fov = buf.get_f32_le()?;
15260        for v in &mut __struct.quaternion {
15261            let val = buf.get_f32_le()?;
15262            *v = val;
15263        }
15264        __struct.signal_quality = buf.get_u8()?;
15265        Ok(__struct)
15266    }
15267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15268        let mut __tmp = BytesMut::new(bytes);
15269        #[allow(clippy::absurd_extreme_comparisons)]
15270        #[allow(unused_comparisons)]
15271        if __tmp.remaining() < Self::ENCODED_LEN {
15272            panic!(
15273                "buffer is too small (need {} bytes, but got {})",
15274                Self::ENCODED_LEN,
15275                __tmp.remaining(),
15276            )
15277        }
15278        __tmp.put_u32_le(self.time_boot_ms);
15279        __tmp.put_u16_le(self.min_distance);
15280        __tmp.put_u16_le(self.max_distance);
15281        __tmp.put_u16_le(self.current_distance);
15282        __tmp.put_u8(self.mavtype as u8);
15283        __tmp.put_u8(self.id);
15284        __tmp.put_u8(self.orientation as u8);
15285        __tmp.put_u8(self.covariance);
15286        if matches!(version, MavlinkVersion::V2) {
15287            __tmp.put_f32_le(self.horizontal_fov);
15288            __tmp.put_f32_le(self.vertical_fov);
15289            for val in &self.quaternion {
15290                __tmp.put_f32_le(*val);
15291            }
15292            __tmp.put_u8(self.signal_quality);
15293            let len = __tmp.len();
15294            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15295        } else {
15296            __tmp.len()
15297        }
15298    }
15299}
15300#[doc = "EFI status output."]
15301#[doc = ""]
15302#[doc = "ID: 225"]
15303#[derive(Debug, Clone, PartialEq)]
15304#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15306#[cfg_attr(feature = "ts", derive(TS))]
15307#[cfg_attr(feature = "ts", ts(export))]
15308pub struct EFI_STATUS_DATA {
15309    #[doc = "ECU index"]
15310    pub ecu_index: f32,
15311    #[doc = "RPM"]
15312    pub rpm: f32,
15313    #[doc = "Fuel consumed"]
15314    pub fuel_consumed: f32,
15315    #[doc = "Fuel flow rate"]
15316    pub fuel_flow: f32,
15317    #[doc = "Engine load"]
15318    pub engine_load: f32,
15319    #[doc = "Throttle position"]
15320    pub throttle_position: f32,
15321    #[doc = "Spark dwell time"]
15322    pub spark_dwell_time: f32,
15323    #[doc = "Barometric pressure"]
15324    pub barometric_pressure: f32,
15325    #[doc = "Intake manifold pressure("]
15326    pub intake_manifold_pressure: f32,
15327    #[doc = "Intake manifold temperature"]
15328    pub intake_manifold_temperature: f32,
15329    #[doc = "Cylinder head temperature"]
15330    pub cylinder_head_temperature: f32,
15331    #[doc = "Ignition timing (Crank angle degrees)"]
15332    pub ignition_timing: f32,
15333    #[doc = "Injection time"]
15334    pub injection_time: f32,
15335    #[doc = "Exhaust gas temperature"]
15336    pub exhaust_gas_temperature: f32,
15337    #[doc = "Output throttle"]
15338    pub throttle_out: f32,
15339    #[doc = "Pressure/temperature compensation"]
15340    pub pt_compensation: f32,
15341    #[doc = "EFI health status"]
15342    pub health: u8,
15343    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
15344    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15345    pub ignition_voltage: f32,
15346    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
15347    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15348    pub fuel_pressure: f32,
15349}
15350impl EFI_STATUS_DATA {
15351    pub const ENCODED_LEN: usize = 73usize;
15352    pub const DEFAULT: Self = Self {
15353        ecu_index: 0.0_f32,
15354        rpm: 0.0_f32,
15355        fuel_consumed: 0.0_f32,
15356        fuel_flow: 0.0_f32,
15357        engine_load: 0.0_f32,
15358        throttle_position: 0.0_f32,
15359        spark_dwell_time: 0.0_f32,
15360        barometric_pressure: 0.0_f32,
15361        intake_manifold_pressure: 0.0_f32,
15362        intake_manifold_temperature: 0.0_f32,
15363        cylinder_head_temperature: 0.0_f32,
15364        ignition_timing: 0.0_f32,
15365        injection_time: 0.0_f32,
15366        exhaust_gas_temperature: 0.0_f32,
15367        throttle_out: 0.0_f32,
15368        pt_compensation: 0.0_f32,
15369        health: 0_u8,
15370        ignition_voltage: 0.0_f32,
15371        fuel_pressure: 0.0_f32,
15372    };
15373    #[cfg(feature = "arbitrary")]
15374    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15375        use arbitrary::{Arbitrary, Unstructured};
15376        let mut buf = [0u8; 1024];
15377        rng.fill_bytes(&mut buf);
15378        let mut unstructured = Unstructured::new(&buf);
15379        Self::arbitrary(&mut unstructured).unwrap_or_default()
15380    }
15381}
15382impl Default for EFI_STATUS_DATA {
15383    fn default() -> Self {
15384        Self::DEFAULT.clone()
15385    }
15386}
15387impl MessageData for EFI_STATUS_DATA {
15388    type Message = MavMessage;
15389    const ID: u32 = 225u32;
15390    const NAME: &'static str = "EFI_STATUS";
15391    const EXTRA_CRC: u8 = 208u8;
15392    const ENCODED_LEN: usize = 73usize;
15393    fn deser(
15394        _version: MavlinkVersion,
15395        __input: &[u8],
15396    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15397        let avail_len = __input.len();
15398        let mut payload_buf = [0; Self::ENCODED_LEN];
15399        let mut buf = if avail_len < Self::ENCODED_LEN {
15400            payload_buf[0..avail_len].copy_from_slice(__input);
15401            Bytes::new(&payload_buf)
15402        } else {
15403            Bytes::new(__input)
15404        };
15405        let mut __struct = Self::default();
15406        __struct.ecu_index = buf.get_f32_le()?;
15407        __struct.rpm = buf.get_f32_le()?;
15408        __struct.fuel_consumed = buf.get_f32_le()?;
15409        __struct.fuel_flow = buf.get_f32_le()?;
15410        __struct.engine_load = buf.get_f32_le()?;
15411        __struct.throttle_position = buf.get_f32_le()?;
15412        __struct.spark_dwell_time = buf.get_f32_le()?;
15413        __struct.barometric_pressure = buf.get_f32_le()?;
15414        __struct.intake_manifold_pressure = buf.get_f32_le()?;
15415        __struct.intake_manifold_temperature = buf.get_f32_le()?;
15416        __struct.cylinder_head_temperature = buf.get_f32_le()?;
15417        __struct.ignition_timing = buf.get_f32_le()?;
15418        __struct.injection_time = buf.get_f32_le()?;
15419        __struct.exhaust_gas_temperature = buf.get_f32_le()?;
15420        __struct.throttle_out = buf.get_f32_le()?;
15421        __struct.pt_compensation = buf.get_f32_le()?;
15422        __struct.health = buf.get_u8()?;
15423        __struct.ignition_voltage = buf.get_f32_le()?;
15424        __struct.fuel_pressure = buf.get_f32_le()?;
15425        Ok(__struct)
15426    }
15427    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15428        let mut __tmp = BytesMut::new(bytes);
15429        #[allow(clippy::absurd_extreme_comparisons)]
15430        #[allow(unused_comparisons)]
15431        if __tmp.remaining() < Self::ENCODED_LEN {
15432            panic!(
15433                "buffer is too small (need {} bytes, but got {})",
15434                Self::ENCODED_LEN,
15435                __tmp.remaining(),
15436            )
15437        }
15438        __tmp.put_f32_le(self.ecu_index);
15439        __tmp.put_f32_le(self.rpm);
15440        __tmp.put_f32_le(self.fuel_consumed);
15441        __tmp.put_f32_le(self.fuel_flow);
15442        __tmp.put_f32_le(self.engine_load);
15443        __tmp.put_f32_le(self.throttle_position);
15444        __tmp.put_f32_le(self.spark_dwell_time);
15445        __tmp.put_f32_le(self.barometric_pressure);
15446        __tmp.put_f32_le(self.intake_manifold_pressure);
15447        __tmp.put_f32_le(self.intake_manifold_temperature);
15448        __tmp.put_f32_le(self.cylinder_head_temperature);
15449        __tmp.put_f32_le(self.ignition_timing);
15450        __tmp.put_f32_le(self.injection_time);
15451        __tmp.put_f32_le(self.exhaust_gas_temperature);
15452        __tmp.put_f32_le(self.throttle_out);
15453        __tmp.put_f32_le(self.pt_compensation);
15454        __tmp.put_u8(self.health);
15455        if matches!(version, MavlinkVersion::V2) {
15456            __tmp.put_f32_le(self.ignition_voltage);
15457            __tmp.put_f32_le(self.fuel_pressure);
15458            let len = __tmp.len();
15459            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15460        } else {
15461            __tmp.len()
15462        }
15463    }
15464}
15465#[doc = "EKF Status message including flags and variances."]
15466#[doc = ""]
15467#[doc = "ID: 193"]
15468#[derive(Debug, Clone, PartialEq)]
15469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15471#[cfg_attr(feature = "ts", derive(TS))]
15472#[cfg_attr(feature = "ts", ts(export))]
15473pub struct EKF_STATUS_REPORT_DATA {
15474    #[doc = "Velocity variance."]
15475    pub velocity_variance: f32,
15476    #[doc = "Horizontal Position variance."]
15477    pub pos_horiz_variance: f32,
15478    #[doc = "Vertical Position variance."]
15479    pub pos_vert_variance: f32,
15480    #[doc = "Compass variance."]
15481    pub compass_variance: f32,
15482    #[doc = "Terrain Altitude variance."]
15483    pub terrain_alt_variance: f32,
15484    #[doc = "Flags."]
15485    pub flags: EkfStatusFlags,
15486    #[doc = "Airspeed variance."]
15487    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15488    pub airspeed_variance: f32,
15489}
15490impl EKF_STATUS_REPORT_DATA {
15491    pub const ENCODED_LEN: usize = 26usize;
15492    pub const DEFAULT: Self = Self {
15493        velocity_variance: 0.0_f32,
15494        pos_horiz_variance: 0.0_f32,
15495        pos_vert_variance: 0.0_f32,
15496        compass_variance: 0.0_f32,
15497        terrain_alt_variance: 0.0_f32,
15498        flags: EkfStatusFlags::DEFAULT,
15499        airspeed_variance: 0.0_f32,
15500    };
15501    #[cfg(feature = "arbitrary")]
15502    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15503        use arbitrary::{Arbitrary, Unstructured};
15504        let mut buf = [0u8; 1024];
15505        rng.fill_bytes(&mut buf);
15506        let mut unstructured = Unstructured::new(&buf);
15507        Self::arbitrary(&mut unstructured).unwrap_or_default()
15508    }
15509}
15510impl Default for EKF_STATUS_REPORT_DATA {
15511    fn default() -> Self {
15512        Self::DEFAULT.clone()
15513    }
15514}
15515impl MessageData for EKF_STATUS_REPORT_DATA {
15516    type Message = MavMessage;
15517    const ID: u32 = 193u32;
15518    const NAME: &'static str = "EKF_STATUS_REPORT";
15519    const EXTRA_CRC: u8 = 71u8;
15520    const ENCODED_LEN: usize = 26usize;
15521    fn deser(
15522        _version: MavlinkVersion,
15523        __input: &[u8],
15524    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15525        let avail_len = __input.len();
15526        let mut payload_buf = [0; Self::ENCODED_LEN];
15527        let mut buf = if avail_len < Self::ENCODED_LEN {
15528            payload_buf[0..avail_len].copy_from_slice(__input);
15529            Bytes::new(&payload_buf)
15530        } else {
15531            Bytes::new(__input)
15532        };
15533        let mut __struct = Self::default();
15534        __struct.velocity_variance = buf.get_f32_le()?;
15535        __struct.pos_horiz_variance = buf.get_f32_le()?;
15536        __struct.pos_vert_variance = buf.get_f32_le()?;
15537        __struct.compass_variance = buf.get_f32_le()?;
15538        __struct.terrain_alt_variance = buf.get_f32_le()?;
15539        let tmp = buf.get_u16_le()?;
15540        __struct.flags = EkfStatusFlags::from_bits(tmp as <EkfStatusFlags as Flags>::Bits).ok_or(
15541            ::mavlink_core::error::ParserError::InvalidFlag {
15542                flag_type: "EkfStatusFlags",
15543                value: tmp as u64,
15544            },
15545        )?;
15546        __struct.airspeed_variance = buf.get_f32_le()?;
15547        Ok(__struct)
15548    }
15549    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15550        let mut __tmp = BytesMut::new(bytes);
15551        #[allow(clippy::absurd_extreme_comparisons)]
15552        #[allow(unused_comparisons)]
15553        if __tmp.remaining() < Self::ENCODED_LEN {
15554            panic!(
15555                "buffer is too small (need {} bytes, but got {})",
15556                Self::ENCODED_LEN,
15557                __tmp.remaining(),
15558            )
15559        }
15560        __tmp.put_f32_le(self.velocity_variance);
15561        __tmp.put_f32_le(self.pos_horiz_variance);
15562        __tmp.put_f32_le(self.pos_vert_variance);
15563        __tmp.put_f32_le(self.compass_variance);
15564        __tmp.put_f32_le(self.terrain_alt_variance);
15565        __tmp.put_u16_le(self.flags.bits() as u16);
15566        if matches!(version, MavlinkVersion::V2) {
15567            __tmp.put_f32_le(self.airspeed_variance);
15568            let len = __tmp.len();
15569            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15570        } else {
15571            __tmp.len()
15572        }
15573    }
15574}
15575#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
15576#[doc = ""]
15577#[doc = "ID: 131"]
15578#[derive(Debug, Clone, PartialEq)]
15579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15581#[cfg_attr(feature = "ts", derive(TS))]
15582#[cfg_attr(feature = "ts", ts(export))]
15583pub struct ENCAPSULATED_DATA_DATA {
15584    #[doc = "sequence number (starting with 0 on every transmission)"]
15585    pub seqnr: u16,
15586    #[doc = "image data bytes"]
15587    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15588    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15589    pub data: [u8; 253],
15590}
15591impl ENCAPSULATED_DATA_DATA {
15592    pub const ENCODED_LEN: usize = 255usize;
15593    pub const DEFAULT: Self = Self {
15594        seqnr: 0_u16,
15595        data: [0_u8; 253usize],
15596    };
15597    #[cfg(feature = "arbitrary")]
15598    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15599        use arbitrary::{Arbitrary, Unstructured};
15600        let mut buf = [0u8; 1024];
15601        rng.fill_bytes(&mut buf);
15602        let mut unstructured = Unstructured::new(&buf);
15603        Self::arbitrary(&mut unstructured).unwrap_or_default()
15604    }
15605}
15606impl Default for ENCAPSULATED_DATA_DATA {
15607    fn default() -> Self {
15608        Self::DEFAULT.clone()
15609    }
15610}
15611impl MessageData for ENCAPSULATED_DATA_DATA {
15612    type Message = MavMessage;
15613    const ID: u32 = 131u32;
15614    const NAME: &'static str = "ENCAPSULATED_DATA";
15615    const EXTRA_CRC: u8 = 223u8;
15616    const ENCODED_LEN: usize = 255usize;
15617    fn deser(
15618        _version: MavlinkVersion,
15619        __input: &[u8],
15620    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15621        let avail_len = __input.len();
15622        let mut payload_buf = [0; Self::ENCODED_LEN];
15623        let mut buf = if avail_len < Self::ENCODED_LEN {
15624            payload_buf[0..avail_len].copy_from_slice(__input);
15625            Bytes::new(&payload_buf)
15626        } else {
15627            Bytes::new(__input)
15628        };
15629        let mut __struct = Self::default();
15630        __struct.seqnr = buf.get_u16_le()?;
15631        for v in &mut __struct.data {
15632            let val = buf.get_u8()?;
15633            *v = val;
15634        }
15635        Ok(__struct)
15636    }
15637    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15638        let mut __tmp = BytesMut::new(bytes);
15639        #[allow(clippy::absurd_extreme_comparisons)]
15640        #[allow(unused_comparisons)]
15641        if __tmp.remaining() < Self::ENCODED_LEN {
15642            panic!(
15643                "buffer is too small (need {} bytes, but got {})",
15644                Self::ENCODED_LEN,
15645                __tmp.remaining(),
15646            )
15647        }
15648        __tmp.put_u16_le(self.seqnr);
15649        for val in &self.data {
15650            __tmp.put_u8(*val);
15651        }
15652        if matches!(version, MavlinkVersion::V2) {
15653            let len = __tmp.len();
15654            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15655        } else {
15656            __tmp.len()
15657        }
15658    }
15659}
15660#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
15661#[doc = ""]
15662#[doc = "ID: 290"]
15663#[derive(Debug, Clone, PartialEq)]
15664#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15665#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15666#[cfg_attr(feature = "ts", derive(TS))]
15667#[cfg_attr(feature = "ts", ts(export))]
15668pub struct ESC_INFO_DATA {
15669    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
15670    pub time_usec: u64,
15671    #[doc = "Number of reported errors by each ESC since boot."]
15672    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15673    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15674    pub error_count: [u32; 4],
15675    #[doc = "Counter of data packets received."]
15676    pub counter: u16,
15677    #[doc = "Bitmap of ESC failure flags."]
15678    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15679    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15680    pub failure_flags: [u16; 4],
15681    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
15682    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15683    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15684    pub temperature: [i16; 4],
15685    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
15686    pub index: u8,
15687    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
15688    pub count: u8,
15689    #[doc = "Connection type protocol for all ESC."]
15690    pub connection_type: EscConnectionType,
15691    #[doc = "Information regarding online/offline status of each ESC."]
15692    pub info: u8,
15693}
15694impl ESC_INFO_DATA {
15695    pub const ENCODED_LEN: usize = 46usize;
15696    pub const DEFAULT: Self = Self {
15697        time_usec: 0_u64,
15698        error_count: [0_u32; 4usize],
15699        counter: 0_u16,
15700        failure_flags: [0_u16; 4usize],
15701        temperature: [0_i16; 4usize],
15702        index: 0_u8,
15703        count: 0_u8,
15704        connection_type: EscConnectionType::DEFAULT,
15705        info: 0_u8,
15706    };
15707    #[cfg(feature = "arbitrary")]
15708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15709        use arbitrary::{Arbitrary, Unstructured};
15710        let mut buf = [0u8; 1024];
15711        rng.fill_bytes(&mut buf);
15712        let mut unstructured = Unstructured::new(&buf);
15713        Self::arbitrary(&mut unstructured).unwrap_or_default()
15714    }
15715}
15716impl Default for ESC_INFO_DATA {
15717    fn default() -> Self {
15718        Self::DEFAULT.clone()
15719    }
15720}
15721impl MessageData for ESC_INFO_DATA {
15722    type Message = MavMessage;
15723    const ID: u32 = 290u32;
15724    const NAME: &'static str = "ESC_INFO";
15725    const EXTRA_CRC: u8 = 251u8;
15726    const ENCODED_LEN: usize = 46usize;
15727    fn deser(
15728        _version: MavlinkVersion,
15729        __input: &[u8],
15730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15731        let avail_len = __input.len();
15732        let mut payload_buf = [0; Self::ENCODED_LEN];
15733        let mut buf = if avail_len < Self::ENCODED_LEN {
15734            payload_buf[0..avail_len].copy_from_slice(__input);
15735            Bytes::new(&payload_buf)
15736        } else {
15737            Bytes::new(__input)
15738        };
15739        let mut __struct = Self::default();
15740        __struct.time_usec = buf.get_u64_le()?;
15741        for v in &mut __struct.error_count {
15742            let val = buf.get_u32_le()?;
15743            *v = val;
15744        }
15745        __struct.counter = buf.get_u16_le()?;
15746        for v in &mut __struct.failure_flags {
15747            let val = buf.get_u16_le()?;
15748            *v = val;
15749        }
15750        for v in &mut __struct.temperature {
15751            let val = buf.get_i16_le()?;
15752            *v = val;
15753        }
15754        __struct.index = buf.get_u8()?;
15755        __struct.count = buf.get_u8()?;
15756        let tmp = buf.get_u8()?;
15757        __struct.connection_type =
15758            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15759                enum_type: "EscConnectionType",
15760                value: tmp as u64,
15761            })?;
15762        __struct.info = buf.get_u8()?;
15763        Ok(__struct)
15764    }
15765    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15766        let mut __tmp = BytesMut::new(bytes);
15767        #[allow(clippy::absurd_extreme_comparisons)]
15768        #[allow(unused_comparisons)]
15769        if __tmp.remaining() < Self::ENCODED_LEN {
15770            panic!(
15771                "buffer is too small (need {} bytes, but got {})",
15772                Self::ENCODED_LEN,
15773                __tmp.remaining(),
15774            )
15775        }
15776        __tmp.put_u64_le(self.time_usec);
15777        for val in &self.error_count {
15778            __tmp.put_u32_le(*val);
15779        }
15780        __tmp.put_u16_le(self.counter);
15781        for val in &self.failure_flags {
15782            __tmp.put_u16_le(*val);
15783        }
15784        for val in &self.temperature {
15785            __tmp.put_i16_le(*val);
15786        }
15787        __tmp.put_u8(self.index);
15788        __tmp.put_u8(self.count);
15789        __tmp.put_u8(self.connection_type as u8);
15790        __tmp.put_u8(self.info);
15791        if matches!(version, MavlinkVersion::V2) {
15792            let len = __tmp.len();
15793            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15794        } else {
15795            __tmp.len()
15796        }
15797    }
15798}
15799#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
15800#[doc = ""]
15801#[doc = "ID: 291"]
15802#[derive(Debug, Clone, PartialEq)]
15803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15805#[cfg_attr(feature = "ts", derive(TS))]
15806#[cfg_attr(feature = "ts", ts(export))]
15807pub struct ESC_STATUS_DATA {
15808    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
15809    pub time_usec: u64,
15810    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
15811    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15812    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15813    pub rpm: [i32; 4],
15814    #[doc = "Voltage measured from each ESC."]
15815    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15816    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15817    pub voltage: [f32; 4],
15818    #[doc = "Current measured from each ESC."]
15819    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15820    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15821    pub current: [f32; 4],
15822    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
15823    pub index: u8,
15824}
15825impl ESC_STATUS_DATA {
15826    pub const ENCODED_LEN: usize = 57usize;
15827    pub const DEFAULT: Self = Self {
15828        time_usec: 0_u64,
15829        rpm: [0_i32; 4usize],
15830        voltage: [0.0_f32; 4usize],
15831        current: [0.0_f32; 4usize],
15832        index: 0_u8,
15833    };
15834    #[cfg(feature = "arbitrary")]
15835    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15836        use arbitrary::{Arbitrary, Unstructured};
15837        let mut buf = [0u8; 1024];
15838        rng.fill_bytes(&mut buf);
15839        let mut unstructured = Unstructured::new(&buf);
15840        Self::arbitrary(&mut unstructured).unwrap_or_default()
15841    }
15842}
15843impl Default for ESC_STATUS_DATA {
15844    fn default() -> Self {
15845        Self::DEFAULT.clone()
15846    }
15847}
15848impl MessageData for ESC_STATUS_DATA {
15849    type Message = MavMessage;
15850    const ID: u32 = 291u32;
15851    const NAME: &'static str = "ESC_STATUS";
15852    const EXTRA_CRC: u8 = 10u8;
15853    const ENCODED_LEN: usize = 57usize;
15854    fn deser(
15855        _version: MavlinkVersion,
15856        __input: &[u8],
15857    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15858        let avail_len = __input.len();
15859        let mut payload_buf = [0; Self::ENCODED_LEN];
15860        let mut buf = if avail_len < Self::ENCODED_LEN {
15861            payload_buf[0..avail_len].copy_from_slice(__input);
15862            Bytes::new(&payload_buf)
15863        } else {
15864            Bytes::new(__input)
15865        };
15866        let mut __struct = Self::default();
15867        __struct.time_usec = buf.get_u64_le()?;
15868        for v in &mut __struct.rpm {
15869            let val = buf.get_i32_le()?;
15870            *v = val;
15871        }
15872        for v in &mut __struct.voltage {
15873            let val = buf.get_f32_le()?;
15874            *v = val;
15875        }
15876        for v in &mut __struct.current {
15877            let val = buf.get_f32_le()?;
15878            *v = val;
15879        }
15880        __struct.index = buf.get_u8()?;
15881        Ok(__struct)
15882    }
15883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15884        let mut __tmp = BytesMut::new(bytes);
15885        #[allow(clippy::absurd_extreme_comparisons)]
15886        #[allow(unused_comparisons)]
15887        if __tmp.remaining() < Self::ENCODED_LEN {
15888            panic!(
15889                "buffer is too small (need {} bytes, but got {})",
15890                Self::ENCODED_LEN,
15891                __tmp.remaining(),
15892            )
15893        }
15894        __tmp.put_u64_le(self.time_usec);
15895        for val in &self.rpm {
15896            __tmp.put_i32_le(*val);
15897        }
15898        for val in &self.voltage {
15899            __tmp.put_f32_le(*val);
15900        }
15901        for val in &self.current {
15902            __tmp.put_f32_le(*val);
15903        }
15904        __tmp.put_u8(self.index);
15905        if matches!(version, MavlinkVersion::V2) {
15906            let len = __tmp.len();
15907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15908        } else {
15909            __tmp.len()
15910        }
15911    }
15912}
15913#[doc = "ESC Telemetry Data for ESCs 13 to 16, matching data sent by BLHeli ESCs."]
15914#[doc = ""]
15915#[doc = "ID: 11040"]
15916#[derive(Debug, Clone, PartialEq)]
15917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15919#[cfg_attr(feature = "ts", derive(TS))]
15920#[cfg_attr(feature = "ts", ts(export))]
15921pub struct ESC_TELEMETRY_13_TO_16_DATA {
15922    #[doc = "Voltage."]
15923    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15924    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15925    pub voltage: [u16; 4],
15926    #[doc = "Current."]
15927    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15928    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15929    pub current: [u16; 4],
15930    #[doc = "Total current."]
15931    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15932    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15933    pub totalcurrent: [u16; 4],
15934    #[doc = "RPM (eRPM)."]
15935    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15936    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15937    pub rpm: [u16; 4],
15938    #[doc = "count of telemetry packets received (wraps at 65535)."]
15939    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15940    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15941    pub count: [u16; 4],
15942    #[doc = "Temperature."]
15943    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15944    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15945    pub temperature: [u8; 4],
15946}
15947impl ESC_TELEMETRY_13_TO_16_DATA {
15948    pub const ENCODED_LEN: usize = 44usize;
15949    pub const DEFAULT: Self = Self {
15950        voltage: [0_u16; 4usize],
15951        current: [0_u16; 4usize],
15952        totalcurrent: [0_u16; 4usize],
15953        rpm: [0_u16; 4usize],
15954        count: [0_u16; 4usize],
15955        temperature: [0_u8; 4usize],
15956    };
15957    #[cfg(feature = "arbitrary")]
15958    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15959        use arbitrary::{Arbitrary, Unstructured};
15960        let mut buf = [0u8; 1024];
15961        rng.fill_bytes(&mut buf);
15962        let mut unstructured = Unstructured::new(&buf);
15963        Self::arbitrary(&mut unstructured).unwrap_or_default()
15964    }
15965}
15966impl Default for ESC_TELEMETRY_13_TO_16_DATA {
15967    fn default() -> Self {
15968        Self::DEFAULT.clone()
15969    }
15970}
15971impl MessageData for ESC_TELEMETRY_13_TO_16_DATA {
15972    type Message = MavMessage;
15973    const ID: u32 = 11040u32;
15974    const NAME: &'static str = "ESC_TELEMETRY_13_TO_16";
15975    const EXTRA_CRC: u8 = 132u8;
15976    const ENCODED_LEN: usize = 44usize;
15977    fn deser(
15978        _version: MavlinkVersion,
15979        __input: &[u8],
15980    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15981        let avail_len = __input.len();
15982        let mut payload_buf = [0; Self::ENCODED_LEN];
15983        let mut buf = if avail_len < Self::ENCODED_LEN {
15984            payload_buf[0..avail_len].copy_from_slice(__input);
15985            Bytes::new(&payload_buf)
15986        } else {
15987            Bytes::new(__input)
15988        };
15989        let mut __struct = Self::default();
15990        for v in &mut __struct.voltage {
15991            let val = buf.get_u16_le()?;
15992            *v = val;
15993        }
15994        for v in &mut __struct.current {
15995            let val = buf.get_u16_le()?;
15996            *v = val;
15997        }
15998        for v in &mut __struct.totalcurrent {
15999            let val = buf.get_u16_le()?;
16000            *v = val;
16001        }
16002        for v in &mut __struct.rpm {
16003            let val = buf.get_u16_le()?;
16004            *v = val;
16005        }
16006        for v in &mut __struct.count {
16007            let val = buf.get_u16_le()?;
16008            *v = val;
16009        }
16010        for v in &mut __struct.temperature {
16011            let val = buf.get_u8()?;
16012            *v = val;
16013        }
16014        Ok(__struct)
16015    }
16016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16017        let mut __tmp = BytesMut::new(bytes);
16018        #[allow(clippy::absurd_extreme_comparisons)]
16019        #[allow(unused_comparisons)]
16020        if __tmp.remaining() < Self::ENCODED_LEN {
16021            panic!(
16022                "buffer is too small (need {} bytes, but got {})",
16023                Self::ENCODED_LEN,
16024                __tmp.remaining(),
16025            )
16026        }
16027        for val in &self.voltage {
16028            __tmp.put_u16_le(*val);
16029        }
16030        for val in &self.current {
16031            __tmp.put_u16_le(*val);
16032        }
16033        for val in &self.totalcurrent {
16034            __tmp.put_u16_le(*val);
16035        }
16036        for val in &self.rpm {
16037            __tmp.put_u16_le(*val);
16038        }
16039        for val in &self.count {
16040            __tmp.put_u16_le(*val);
16041        }
16042        for val in &self.temperature {
16043            __tmp.put_u8(*val);
16044        }
16045        if matches!(version, MavlinkVersion::V2) {
16046            let len = __tmp.len();
16047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16048        } else {
16049            __tmp.len()
16050        }
16051    }
16052}
16053#[doc = "ESC Telemetry Data for ESCs 17 to 20, matching data sent by BLHeli ESCs."]
16054#[doc = ""]
16055#[doc = "ID: 11041"]
16056#[derive(Debug, Clone, PartialEq)]
16057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16059#[cfg_attr(feature = "ts", derive(TS))]
16060#[cfg_attr(feature = "ts", ts(export))]
16061pub struct ESC_TELEMETRY_17_TO_20_DATA {
16062    #[doc = "Voltage."]
16063    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16064    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16065    pub voltage: [u16; 4],
16066    #[doc = "Current."]
16067    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16068    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16069    pub current: [u16; 4],
16070    #[doc = "Total current."]
16071    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16072    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16073    pub totalcurrent: [u16; 4],
16074    #[doc = "RPM (eRPM)."]
16075    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16076    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16077    pub rpm: [u16; 4],
16078    #[doc = "count of telemetry packets received (wraps at 65535)."]
16079    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16080    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16081    pub count: [u16; 4],
16082    #[doc = "Temperature."]
16083    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16084    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16085    pub temperature: [u8; 4],
16086}
16087impl ESC_TELEMETRY_17_TO_20_DATA {
16088    pub const ENCODED_LEN: usize = 44usize;
16089    pub const DEFAULT: Self = Self {
16090        voltage: [0_u16; 4usize],
16091        current: [0_u16; 4usize],
16092        totalcurrent: [0_u16; 4usize],
16093        rpm: [0_u16; 4usize],
16094        count: [0_u16; 4usize],
16095        temperature: [0_u8; 4usize],
16096    };
16097    #[cfg(feature = "arbitrary")]
16098    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16099        use arbitrary::{Arbitrary, Unstructured};
16100        let mut buf = [0u8; 1024];
16101        rng.fill_bytes(&mut buf);
16102        let mut unstructured = Unstructured::new(&buf);
16103        Self::arbitrary(&mut unstructured).unwrap_or_default()
16104    }
16105}
16106impl Default for ESC_TELEMETRY_17_TO_20_DATA {
16107    fn default() -> Self {
16108        Self::DEFAULT.clone()
16109    }
16110}
16111impl MessageData for ESC_TELEMETRY_17_TO_20_DATA {
16112    type Message = MavMessage;
16113    const ID: u32 = 11041u32;
16114    const NAME: &'static str = "ESC_TELEMETRY_17_TO_20";
16115    const EXTRA_CRC: u8 = 208u8;
16116    const ENCODED_LEN: usize = 44usize;
16117    fn deser(
16118        _version: MavlinkVersion,
16119        __input: &[u8],
16120    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16121        let avail_len = __input.len();
16122        let mut payload_buf = [0; Self::ENCODED_LEN];
16123        let mut buf = if avail_len < Self::ENCODED_LEN {
16124            payload_buf[0..avail_len].copy_from_slice(__input);
16125            Bytes::new(&payload_buf)
16126        } else {
16127            Bytes::new(__input)
16128        };
16129        let mut __struct = Self::default();
16130        for v in &mut __struct.voltage {
16131            let val = buf.get_u16_le()?;
16132            *v = val;
16133        }
16134        for v in &mut __struct.current {
16135            let val = buf.get_u16_le()?;
16136            *v = val;
16137        }
16138        for v in &mut __struct.totalcurrent {
16139            let val = buf.get_u16_le()?;
16140            *v = val;
16141        }
16142        for v in &mut __struct.rpm {
16143            let val = buf.get_u16_le()?;
16144            *v = val;
16145        }
16146        for v in &mut __struct.count {
16147            let val = buf.get_u16_le()?;
16148            *v = val;
16149        }
16150        for v in &mut __struct.temperature {
16151            let val = buf.get_u8()?;
16152            *v = val;
16153        }
16154        Ok(__struct)
16155    }
16156    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16157        let mut __tmp = BytesMut::new(bytes);
16158        #[allow(clippy::absurd_extreme_comparisons)]
16159        #[allow(unused_comparisons)]
16160        if __tmp.remaining() < Self::ENCODED_LEN {
16161            panic!(
16162                "buffer is too small (need {} bytes, but got {})",
16163                Self::ENCODED_LEN,
16164                __tmp.remaining(),
16165            )
16166        }
16167        for val in &self.voltage {
16168            __tmp.put_u16_le(*val);
16169        }
16170        for val in &self.current {
16171            __tmp.put_u16_le(*val);
16172        }
16173        for val in &self.totalcurrent {
16174            __tmp.put_u16_le(*val);
16175        }
16176        for val in &self.rpm {
16177            __tmp.put_u16_le(*val);
16178        }
16179        for val in &self.count {
16180            __tmp.put_u16_le(*val);
16181        }
16182        for val in &self.temperature {
16183            __tmp.put_u8(*val);
16184        }
16185        if matches!(version, MavlinkVersion::V2) {
16186            let len = __tmp.len();
16187            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16188        } else {
16189            __tmp.len()
16190        }
16191    }
16192}
16193#[doc = "ESC Telemetry Data for ESCs 1 to 4, matching data sent by BLHeli ESCs."]
16194#[doc = ""]
16195#[doc = "ID: 11030"]
16196#[derive(Debug, Clone, PartialEq)]
16197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16199#[cfg_attr(feature = "ts", derive(TS))]
16200#[cfg_attr(feature = "ts", ts(export))]
16201pub struct ESC_TELEMETRY_1_TO_4_DATA {
16202    #[doc = "Voltage."]
16203    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16204    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16205    pub voltage: [u16; 4],
16206    #[doc = "Current."]
16207    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16208    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16209    pub current: [u16; 4],
16210    #[doc = "Total current."]
16211    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16212    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16213    pub totalcurrent: [u16; 4],
16214    #[doc = "RPM (eRPM)."]
16215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16216    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16217    pub rpm: [u16; 4],
16218    #[doc = "count of telemetry packets received (wraps at 65535)."]
16219    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16220    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16221    pub count: [u16; 4],
16222    #[doc = "Temperature."]
16223    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16224    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16225    pub temperature: [u8; 4],
16226}
16227impl ESC_TELEMETRY_1_TO_4_DATA {
16228    pub const ENCODED_LEN: usize = 44usize;
16229    pub const DEFAULT: Self = Self {
16230        voltage: [0_u16; 4usize],
16231        current: [0_u16; 4usize],
16232        totalcurrent: [0_u16; 4usize],
16233        rpm: [0_u16; 4usize],
16234        count: [0_u16; 4usize],
16235        temperature: [0_u8; 4usize],
16236    };
16237    #[cfg(feature = "arbitrary")]
16238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16239        use arbitrary::{Arbitrary, Unstructured};
16240        let mut buf = [0u8; 1024];
16241        rng.fill_bytes(&mut buf);
16242        let mut unstructured = Unstructured::new(&buf);
16243        Self::arbitrary(&mut unstructured).unwrap_or_default()
16244    }
16245}
16246impl Default for ESC_TELEMETRY_1_TO_4_DATA {
16247    fn default() -> Self {
16248        Self::DEFAULT.clone()
16249    }
16250}
16251impl MessageData for ESC_TELEMETRY_1_TO_4_DATA {
16252    type Message = MavMessage;
16253    const ID: u32 = 11030u32;
16254    const NAME: &'static str = "ESC_TELEMETRY_1_TO_4";
16255    const EXTRA_CRC: u8 = 144u8;
16256    const ENCODED_LEN: usize = 44usize;
16257    fn deser(
16258        _version: MavlinkVersion,
16259        __input: &[u8],
16260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16261        let avail_len = __input.len();
16262        let mut payload_buf = [0; Self::ENCODED_LEN];
16263        let mut buf = if avail_len < Self::ENCODED_LEN {
16264            payload_buf[0..avail_len].copy_from_slice(__input);
16265            Bytes::new(&payload_buf)
16266        } else {
16267            Bytes::new(__input)
16268        };
16269        let mut __struct = Self::default();
16270        for v in &mut __struct.voltage {
16271            let val = buf.get_u16_le()?;
16272            *v = val;
16273        }
16274        for v in &mut __struct.current {
16275            let val = buf.get_u16_le()?;
16276            *v = val;
16277        }
16278        for v in &mut __struct.totalcurrent {
16279            let val = buf.get_u16_le()?;
16280            *v = val;
16281        }
16282        for v in &mut __struct.rpm {
16283            let val = buf.get_u16_le()?;
16284            *v = val;
16285        }
16286        for v in &mut __struct.count {
16287            let val = buf.get_u16_le()?;
16288            *v = val;
16289        }
16290        for v in &mut __struct.temperature {
16291            let val = buf.get_u8()?;
16292            *v = val;
16293        }
16294        Ok(__struct)
16295    }
16296    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16297        let mut __tmp = BytesMut::new(bytes);
16298        #[allow(clippy::absurd_extreme_comparisons)]
16299        #[allow(unused_comparisons)]
16300        if __tmp.remaining() < Self::ENCODED_LEN {
16301            panic!(
16302                "buffer is too small (need {} bytes, but got {})",
16303                Self::ENCODED_LEN,
16304                __tmp.remaining(),
16305            )
16306        }
16307        for val in &self.voltage {
16308            __tmp.put_u16_le(*val);
16309        }
16310        for val in &self.current {
16311            __tmp.put_u16_le(*val);
16312        }
16313        for val in &self.totalcurrent {
16314            __tmp.put_u16_le(*val);
16315        }
16316        for val in &self.rpm {
16317            __tmp.put_u16_le(*val);
16318        }
16319        for val in &self.count {
16320            __tmp.put_u16_le(*val);
16321        }
16322        for val in &self.temperature {
16323            __tmp.put_u8(*val);
16324        }
16325        if matches!(version, MavlinkVersion::V2) {
16326            let len = __tmp.len();
16327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16328        } else {
16329            __tmp.len()
16330        }
16331    }
16332}
16333#[doc = "ESC Telemetry Data for ESCs 21 to 24, matching data sent by BLHeli ESCs."]
16334#[doc = ""]
16335#[doc = "ID: 11042"]
16336#[derive(Debug, Clone, PartialEq)]
16337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16339#[cfg_attr(feature = "ts", derive(TS))]
16340#[cfg_attr(feature = "ts", ts(export))]
16341pub struct ESC_TELEMETRY_21_TO_24_DATA {
16342    #[doc = "Voltage."]
16343    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16344    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16345    pub voltage: [u16; 4],
16346    #[doc = "Current."]
16347    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16348    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16349    pub current: [u16; 4],
16350    #[doc = "Total current."]
16351    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16352    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16353    pub totalcurrent: [u16; 4],
16354    #[doc = "RPM (eRPM)."]
16355    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16356    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16357    pub rpm: [u16; 4],
16358    #[doc = "count of telemetry packets received (wraps at 65535)."]
16359    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16360    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16361    pub count: [u16; 4],
16362    #[doc = "Temperature."]
16363    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16364    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16365    pub temperature: [u8; 4],
16366}
16367impl ESC_TELEMETRY_21_TO_24_DATA {
16368    pub const ENCODED_LEN: usize = 44usize;
16369    pub const DEFAULT: Self = Self {
16370        voltage: [0_u16; 4usize],
16371        current: [0_u16; 4usize],
16372        totalcurrent: [0_u16; 4usize],
16373        rpm: [0_u16; 4usize],
16374        count: [0_u16; 4usize],
16375        temperature: [0_u8; 4usize],
16376    };
16377    #[cfg(feature = "arbitrary")]
16378    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16379        use arbitrary::{Arbitrary, Unstructured};
16380        let mut buf = [0u8; 1024];
16381        rng.fill_bytes(&mut buf);
16382        let mut unstructured = Unstructured::new(&buf);
16383        Self::arbitrary(&mut unstructured).unwrap_or_default()
16384    }
16385}
16386impl Default for ESC_TELEMETRY_21_TO_24_DATA {
16387    fn default() -> Self {
16388        Self::DEFAULT.clone()
16389    }
16390}
16391impl MessageData for ESC_TELEMETRY_21_TO_24_DATA {
16392    type Message = MavMessage;
16393    const ID: u32 = 11042u32;
16394    const NAME: &'static str = "ESC_TELEMETRY_21_TO_24";
16395    const EXTRA_CRC: u8 = 201u8;
16396    const ENCODED_LEN: usize = 44usize;
16397    fn deser(
16398        _version: MavlinkVersion,
16399        __input: &[u8],
16400    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16401        let avail_len = __input.len();
16402        let mut payload_buf = [0; Self::ENCODED_LEN];
16403        let mut buf = if avail_len < Self::ENCODED_LEN {
16404            payload_buf[0..avail_len].copy_from_slice(__input);
16405            Bytes::new(&payload_buf)
16406        } else {
16407            Bytes::new(__input)
16408        };
16409        let mut __struct = Self::default();
16410        for v in &mut __struct.voltage {
16411            let val = buf.get_u16_le()?;
16412            *v = val;
16413        }
16414        for v in &mut __struct.current {
16415            let val = buf.get_u16_le()?;
16416            *v = val;
16417        }
16418        for v in &mut __struct.totalcurrent {
16419            let val = buf.get_u16_le()?;
16420            *v = val;
16421        }
16422        for v in &mut __struct.rpm {
16423            let val = buf.get_u16_le()?;
16424            *v = val;
16425        }
16426        for v in &mut __struct.count {
16427            let val = buf.get_u16_le()?;
16428            *v = val;
16429        }
16430        for v in &mut __struct.temperature {
16431            let val = buf.get_u8()?;
16432            *v = val;
16433        }
16434        Ok(__struct)
16435    }
16436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16437        let mut __tmp = BytesMut::new(bytes);
16438        #[allow(clippy::absurd_extreme_comparisons)]
16439        #[allow(unused_comparisons)]
16440        if __tmp.remaining() < Self::ENCODED_LEN {
16441            panic!(
16442                "buffer is too small (need {} bytes, but got {})",
16443                Self::ENCODED_LEN,
16444                __tmp.remaining(),
16445            )
16446        }
16447        for val in &self.voltage {
16448            __tmp.put_u16_le(*val);
16449        }
16450        for val in &self.current {
16451            __tmp.put_u16_le(*val);
16452        }
16453        for val in &self.totalcurrent {
16454            __tmp.put_u16_le(*val);
16455        }
16456        for val in &self.rpm {
16457            __tmp.put_u16_le(*val);
16458        }
16459        for val in &self.count {
16460            __tmp.put_u16_le(*val);
16461        }
16462        for val in &self.temperature {
16463            __tmp.put_u8(*val);
16464        }
16465        if matches!(version, MavlinkVersion::V2) {
16466            let len = __tmp.len();
16467            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16468        } else {
16469            __tmp.len()
16470        }
16471    }
16472}
16473#[doc = "ESC Telemetry Data for ESCs 25 to 28, matching data sent by BLHeli ESCs."]
16474#[doc = ""]
16475#[doc = "ID: 11043"]
16476#[derive(Debug, Clone, PartialEq)]
16477#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16479#[cfg_attr(feature = "ts", derive(TS))]
16480#[cfg_attr(feature = "ts", ts(export))]
16481pub struct ESC_TELEMETRY_25_TO_28_DATA {
16482    #[doc = "Voltage."]
16483    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16484    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16485    pub voltage: [u16; 4],
16486    #[doc = "Current."]
16487    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16488    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16489    pub current: [u16; 4],
16490    #[doc = "Total current."]
16491    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16492    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16493    pub totalcurrent: [u16; 4],
16494    #[doc = "RPM (eRPM)."]
16495    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16496    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16497    pub rpm: [u16; 4],
16498    #[doc = "count of telemetry packets received (wraps at 65535)."]
16499    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16500    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16501    pub count: [u16; 4],
16502    #[doc = "Temperature."]
16503    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16504    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16505    pub temperature: [u8; 4],
16506}
16507impl ESC_TELEMETRY_25_TO_28_DATA {
16508    pub const ENCODED_LEN: usize = 44usize;
16509    pub const DEFAULT: Self = Self {
16510        voltage: [0_u16; 4usize],
16511        current: [0_u16; 4usize],
16512        totalcurrent: [0_u16; 4usize],
16513        rpm: [0_u16; 4usize],
16514        count: [0_u16; 4usize],
16515        temperature: [0_u8; 4usize],
16516    };
16517    #[cfg(feature = "arbitrary")]
16518    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16519        use arbitrary::{Arbitrary, Unstructured};
16520        let mut buf = [0u8; 1024];
16521        rng.fill_bytes(&mut buf);
16522        let mut unstructured = Unstructured::new(&buf);
16523        Self::arbitrary(&mut unstructured).unwrap_or_default()
16524    }
16525}
16526impl Default for ESC_TELEMETRY_25_TO_28_DATA {
16527    fn default() -> Self {
16528        Self::DEFAULT.clone()
16529    }
16530}
16531impl MessageData for ESC_TELEMETRY_25_TO_28_DATA {
16532    type Message = MavMessage;
16533    const ID: u32 = 11043u32;
16534    const NAME: &'static str = "ESC_TELEMETRY_25_TO_28";
16535    const EXTRA_CRC: u8 = 193u8;
16536    const ENCODED_LEN: usize = 44usize;
16537    fn deser(
16538        _version: MavlinkVersion,
16539        __input: &[u8],
16540    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16541        let avail_len = __input.len();
16542        let mut payload_buf = [0; Self::ENCODED_LEN];
16543        let mut buf = if avail_len < Self::ENCODED_LEN {
16544            payload_buf[0..avail_len].copy_from_slice(__input);
16545            Bytes::new(&payload_buf)
16546        } else {
16547            Bytes::new(__input)
16548        };
16549        let mut __struct = Self::default();
16550        for v in &mut __struct.voltage {
16551            let val = buf.get_u16_le()?;
16552            *v = val;
16553        }
16554        for v in &mut __struct.current {
16555            let val = buf.get_u16_le()?;
16556            *v = val;
16557        }
16558        for v in &mut __struct.totalcurrent {
16559            let val = buf.get_u16_le()?;
16560            *v = val;
16561        }
16562        for v in &mut __struct.rpm {
16563            let val = buf.get_u16_le()?;
16564            *v = val;
16565        }
16566        for v in &mut __struct.count {
16567            let val = buf.get_u16_le()?;
16568            *v = val;
16569        }
16570        for v in &mut __struct.temperature {
16571            let val = buf.get_u8()?;
16572            *v = val;
16573        }
16574        Ok(__struct)
16575    }
16576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16577        let mut __tmp = BytesMut::new(bytes);
16578        #[allow(clippy::absurd_extreme_comparisons)]
16579        #[allow(unused_comparisons)]
16580        if __tmp.remaining() < Self::ENCODED_LEN {
16581            panic!(
16582                "buffer is too small (need {} bytes, but got {})",
16583                Self::ENCODED_LEN,
16584                __tmp.remaining(),
16585            )
16586        }
16587        for val in &self.voltage {
16588            __tmp.put_u16_le(*val);
16589        }
16590        for val in &self.current {
16591            __tmp.put_u16_le(*val);
16592        }
16593        for val in &self.totalcurrent {
16594            __tmp.put_u16_le(*val);
16595        }
16596        for val in &self.rpm {
16597            __tmp.put_u16_le(*val);
16598        }
16599        for val in &self.count {
16600            __tmp.put_u16_le(*val);
16601        }
16602        for val in &self.temperature {
16603            __tmp.put_u8(*val);
16604        }
16605        if matches!(version, MavlinkVersion::V2) {
16606            let len = __tmp.len();
16607            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16608        } else {
16609            __tmp.len()
16610        }
16611    }
16612}
16613#[doc = "ESC Telemetry Data for ESCs 29 to 32, matching data sent by BLHeli ESCs."]
16614#[doc = ""]
16615#[doc = "ID: 11044"]
16616#[derive(Debug, Clone, PartialEq)]
16617#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16619#[cfg_attr(feature = "ts", derive(TS))]
16620#[cfg_attr(feature = "ts", ts(export))]
16621pub struct ESC_TELEMETRY_29_TO_32_DATA {
16622    #[doc = "Voltage."]
16623    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16624    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16625    pub voltage: [u16; 4],
16626    #[doc = "Current."]
16627    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16628    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16629    pub current: [u16; 4],
16630    #[doc = "Total current."]
16631    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16632    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16633    pub totalcurrent: [u16; 4],
16634    #[doc = "RPM (eRPM)."]
16635    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16636    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16637    pub rpm: [u16; 4],
16638    #[doc = "count of telemetry packets received (wraps at 65535)."]
16639    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16640    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16641    pub count: [u16; 4],
16642    #[doc = "Temperature."]
16643    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16644    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16645    pub temperature: [u8; 4],
16646}
16647impl ESC_TELEMETRY_29_TO_32_DATA {
16648    pub const ENCODED_LEN: usize = 44usize;
16649    pub const DEFAULT: Self = Self {
16650        voltage: [0_u16; 4usize],
16651        current: [0_u16; 4usize],
16652        totalcurrent: [0_u16; 4usize],
16653        rpm: [0_u16; 4usize],
16654        count: [0_u16; 4usize],
16655        temperature: [0_u8; 4usize],
16656    };
16657    #[cfg(feature = "arbitrary")]
16658    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16659        use arbitrary::{Arbitrary, Unstructured};
16660        let mut buf = [0u8; 1024];
16661        rng.fill_bytes(&mut buf);
16662        let mut unstructured = Unstructured::new(&buf);
16663        Self::arbitrary(&mut unstructured).unwrap_or_default()
16664    }
16665}
16666impl Default for ESC_TELEMETRY_29_TO_32_DATA {
16667    fn default() -> Self {
16668        Self::DEFAULT.clone()
16669    }
16670}
16671impl MessageData for ESC_TELEMETRY_29_TO_32_DATA {
16672    type Message = MavMessage;
16673    const ID: u32 = 11044u32;
16674    const NAME: &'static str = "ESC_TELEMETRY_29_TO_32";
16675    const EXTRA_CRC: u8 = 189u8;
16676    const ENCODED_LEN: usize = 44usize;
16677    fn deser(
16678        _version: MavlinkVersion,
16679        __input: &[u8],
16680    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16681        let avail_len = __input.len();
16682        let mut payload_buf = [0; Self::ENCODED_LEN];
16683        let mut buf = if avail_len < Self::ENCODED_LEN {
16684            payload_buf[0..avail_len].copy_from_slice(__input);
16685            Bytes::new(&payload_buf)
16686        } else {
16687            Bytes::new(__input)
16688        };
16689        let mut __struct = Self::default();
16690        for v in &mut __struct.voltage {
16691            let val = buf.get_u16_le()?;
16692            *v = val;
16693        }
16694        for v in &mut __struct.current {
16695            let val = buf.get_u16_le()?;
16696            *v = val;
16697        }
16698        for v in &mut __struct.totalcurrent {
16699            let val = buf.get_u16_le()?;
16700            *v = val;
16701        }
16702        for v in &mut __struct.rpm {
16703            let val = buf.get_u16_le()?;
16704            *v = val;
16705        }
16706        for v in &mut __struct.count {
16707            let val = buf.get_u16_le()?;
16708            *v = val;
16709        }
16710        for v in &mut __struct.temperature {
16711            let val = buf.get_u8()?;
16712            *v = val;
16713        }
16714        Ok(__struct)
16715    }
16716    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16717        let mut __tmp = BytesMut::new(bytes);
16718        #[allow(clippy::absurd_extreme_comparisons)]
16719        #[allow(unused_comparisons)]
16720        if __tmp.remaining() < Self::ENCODED_LEN {
16721            panic!(
16722                "buffer is too small (need {} bytes, but got {})",
16723                Self::ENCODED_LEN,
16724                __tmp.remaining(),
16725            )
16726        }
16727        for val in &self.voltage {
16728            __tmp.put_u16_le(*val);
16729        }
16730        for val in &self.current {
16731            __tmp.put_u16_le(*val);
16732        }
16733        for val in &self.totalcurrent {
16734            __tmp.put_u16_le(*val);
16735        }
16736        for val in &self.rpm {
16737            __tmp.put_u16_le(*val);
16738        }
16739        for val in &self.count {
16740            __tmp.put_u16_le(*val);
16741        }
16742        for val in &self.temperature {
16743            __tmp.put_u8(*val);
16744        }
16745        if matches!(version, MavlinkVersion::V2) {
16746            let len = __tmp.len();
16747            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16748        } else {
16749            __tmp.len()
16750        }
16751    }
16752}
16753#[doc = "ESC Telemetry Data for ESCs 5 to 8, matching data sent by BLHeli ESCs."]
16754#[doc = ""]
16755#[doc = "ID: 11031"]
16756#[derive(Debug, Clone, PartialEq)]
16757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16759#[cfg_attr(feature = "ts", derive(TS))]
16760#[cfg_attr(feature = "ts", ts(export))]
16761pub struct ESC_TELEMETRY_5_TO_8_DATA {
16762    #[doc = "Voltage."]
16763    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16764    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16765    pub voltage: [u16; 4],
16766    #[doc = "Current."]
16767    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16768    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16769    pub current: [u16; 4],
16770    #[doc = "Total current."]
16771    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16772    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16773    pub totalcurrent: [u16; 4],
16774    #[doc = "RPM (eRPM)."]
16775    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16776    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16777    pub rpm: [u16; 4],
16778    #[doc = "count of telemetry packets received (wraps at 65535)."]
16779    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16780    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16781    pub count: [u16; 4],
16782    #[doc = "Temperature."]
16783    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16784    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16785    pub temperature: [u8; 4],
16786}
16787impl ESC_TELEMETRY_5_TO_8_DATA {
16788    pub const ENCODED_LEN: usize = 44usize;
16789    pub const DEFAULT: Self = Self {
16790        voltage: [0_u16; 4usize],
16791        current: [0_u16; 4usize],
16792        totalcurrent: [0_u16; 4usize],
16793        rpm: [0_u16; 4usize],
16794        count: [0_u16; 4usize],
16795        temperature: [0_u8; 4usize],
16796    };
16797    #[cfg(feature = "arbitrary")]
16798    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16799        use arbitrary::{Arbitrary, Unstructured};
16800        let mut buf = [0u8; 1024];
16801        rng.fill_bytes(&mut buf);
16802        let mut unstructured = Unstructured::new(&buf);
16803        Self::arbitrary(&mut unstructured).unwrap_or_default()
16804    }
16805}
16806impl Default for ESC_TELEMETRY_5_TO_8_DATA {
16807    fn default() -> Self {
16808        Self::DEFAULT.clone()
16809    }
16810}
16811impl MessageData for ESC_TELEMETRY_5_TO_8_DATA {
16812    type Message = MavMessage;
16813    const ID: u32 = 11031u32;
16814    const NAME: &'static str = "ESC_TELEMETRY_5_TO_8";
16815    const EXTRA_CRC: u8 = 133u8;
16816    const ENCODED_LEN: usize = 44usize;
16817    fn deser(
16818        _version: MavlinkVersion,
16819        __input: &[u8],
16820    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16821        let avail_len = __input.len();
16822        let mut payload_buf = [0; Self::ENCODED_LEN];
16823        let mut buf = if avail_len < Self::ENCODED_LEN {
16824            payload_buf[0..avail_len].copy_from_slice(__input);
16825            Bytes::new(&payload_buf)
16826        } else {
16827            Bytes::new(__input)
16828        };
16829        let mut __struct = Self::default();
16830        for v in &mut __struct.voltage {
16831            let val = buf.get_u16_le()?;
16832            *v = val;
16833        }
16834        for v in &mut __struct.current {
16835            let val = buf.get_u16_le()?;
16836            *v = val;
16837        }
16838        for v in &mut __struct.totalcurrent {
16839            let val = buf.get_u16_le()?;
16840            *v = val;
16841        }
16842        for v in &mut __struct.rpm {
16843            let val = buf.get_u16_le()?;
16844            *v = val;
16845        }
16846        for v in &mut __struct.count {
16847            let val = buf.get_u16_le()?;
16848            *v = val;
16849        }
16850        for v in &mut __struct.temperature {
16851            let val = buf.get_u8()?;
16852            *v = val;
16853        }
16854        Ok(__struct)
16855    }
16856    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16857        let mut __tmp = BytesMut::new(bytes);
16858        #[allow(clippy::absurd_extreme_comparisons)]
16859        #[allow(unused_comparisons)]
16860        if __tmp.remaining() < Self::ENCODED_LEN {
16861            panic!(
16862                "buffer is too small (need {} bytes, but got {})",
16863                Self::ENCODED_LEN,
16864                __tmp.remaining(),
16865            )
16866        }
16867        for val in &self.voltage {
16868            __tmp.put_u16_le(*val);
16869        }
16870        for val in &self.current {
16871            __tmp.put_u16_le(*val);
16872        }
16873        for val in &self.totalcurrent {
16874            __tmp.put_u16_le(*val);
16875        }
16876        for val in &self.rpm {
16877            __tmp.put_u16_le(*val);
16878        }
16879        for val in &self.count {
16880            __tmp.put_u16_le(*val);
16881        }
16882        for val in &self.temperature {
16883            __tmp.put_u8(*val);
16884        }
16885        if matches!(version, MavlinkVersion::V2) {
16886            let len = __tmp.len();
16887            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16888        } else {
16889            __tmp.len()
16890        }
16891    }
16892}
16893#[doc = "ESC Telemetry Data for ESCs 9 to 12, matching data sent by BLHeli ESCs."]
16894#[doc = ""]
16895#[doc = "ID: 11032"]
16896#[derive(Debug, Clone, PartialEq)]
16897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16899#[cfg_attr(feature = "ts", derive(TS))]
16900#[cfg_attr(feature = "ts", ts(export))]
16901pub struct ESC_TELEMETRY_9_TO_12_DATA {
16902    #[doc = "Voltage."]
16903    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16904    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16905    pub voltage: [u16; 4],
16906    #[doc = "Current."]
16907    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16908    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16909    pub current: [u16; 4],
16910    #[doc = "Total current."]
16911    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16912    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16913    pub totalcurrent: [u16; 4],
16914    #[doc = "RPM (eRPM)."]
16915    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16916    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16917    pub rpm: [u16; 4],
16918    #[doc = "count of telemetry packets received (wraps at 65535)."]
16919    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16920    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16921    pub count: [u16; 4],
16922    #[doc = "Temperature."]
16923    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16924    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16925    pub temperature: [u8; 4],
16926}
16927impl ESC_TELEMETRY_9_TO_12_DATA {
16928    pub const ENCODED_LEN: usize = 44usize;
16929    pub const DEFAULT: Self = Self {
16930        voltage: [0_u16; 4usize],
16931        current: [0_u16; 4usize],
16932        totalcurrent: [0_u16; 4usize],
16933        rpm: [0_u16; 4usize],
16934        count: [0_u16; 4usize],
16935        temperature: [0_u8; 4usize],
16936    };
16937    #[cfg(feature = "arbitrary")]
16938    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16939        use arbitrary::{Arbitrary, Unstructured};
16940        let mut buf = [0u8; 1024];
16941        rng.fill_bytes(&mut buf);
16942        let mut unstructured = Unstructured::new(&buf);
16943        Self::arbitrary(&mut unstructured).unwrap_or_default()
16944    }
16945}
16946impl Default for ESC_TELEMETRY_9_TO_12_DATA {
16947    fn default() -> Self {
16948        Self::DEFAULT.clone()
16949    }
16950}
16951impl MessageData for ESC_TELEMETRY_9_TO_12_DATA {
16952    type Message = MavMessage;
16953    const ID: u32 = 11032u32;
16954    const NAME: &'static str = "ESC_TELEMETRY_9_TO_12";
16955    const EXTRA_CRC: u8 = 85u8;
16956    const ENCODED_LEN: usize = 44usize;
16957    fn deser(
16958        _version: MavlinkVersion,
16959        __input: &[u8],
16960    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16961        let avail_len = __input.len();
16962        let mut payload_buf = [0; Self::ENCODED_LEN];
16963        let mut buf = if avail_len < Self::ENCODED_LEN {
16964            payload_buf[0..avail_len].copy_from_slice(__input);
16965            Bytes::new(&payload_buf)
16966        } else {
16967            Bytes::new(__input)
16968        };
16969        let mut __struct = Self::default();
16970        for v in &mut __struct.voltage {
16971            let val = buf.get_u16_le()?;
16972            *v = val;
16973        }
16974        for v in &mut __struct.current {
16975            let val = buf.get_u16_le()?;
16976            *v = val;
16977        }
16978        for v in &mut __struct.totalcurrent {
16979            let val = buf.get_u16_le()?;
16980            *v = val;
16981        }
16982        for v in &mut __struct.rpm {
16983            let val = buf.get_u16_le()?;
16984            *v = val;
16985        }
16986        for v in &mut __struct.count {
16987            let val = buf.get_u16_le()?;
16988            *v = val;
16989        }
16990        for v in &mut __struct.temperature {
16991            let val = buf.get_u8()?;
16992            *v = val;
16993        }
16994        Ok(__struct)
16995    }
16996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16997        let mut __tmp = BytesMut::new(bytes);
16998        #[allow(clippy::absurd_extreme_comparisons)]
16999        #[allow(unused_comparisons)]
17000        if __tmp.remaining() < Self::ENCODED_LEN {
17001            panic!(
17002                "buffer is too small (need {} bytes, but got {})",
17003                Self::ENCODED_LEN,
17004                __tmp.remaining(),
17005            )
17006        }
17007        for val in &self.voltage {
17008            __tmp.put_u16_le(*val);
17009        }
17010        for val in &self.current {
17011            __tmp.put_u16_le(*val);
17012        }
17013        for val in &self.totalcurrent {
17014            __tmp.put_u16_le(*val);
17015        }
17016        for val in &self.rpm {
17017            __tmp.put_u16_le(*val);
17018        }
17019        for val in &self.count {
17020            __tmp.put_u16_le(*val);
17021        }
17022        for val in &self.temperature {
17023            __tmp.put_u8(*val);
17024        }
17025        if matches!(version, MavlinkVersion::V2) {
17026            let len = __tmp.len();
17027            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17028        } else {
17029            __tmp.len()
17030        }
17031    }
17032}
17033#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
17034#[doc = ""]
17035#[doc = "ID: 230"]
17036#[derive(Debug, Clone, PartialEq)]
17037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17039#[cfg_attr(feature = "ts", derive(TS))]
17040#[cfg_attr(feature = "ts", ts(export))]
17041pub struct ESTIMATOR_STATUS_DATA {
17042    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17043    pub time_usec: u64,
17044    #[doc = "Velocity innovation test ratio"]
17045    pub vel_ratio: f32,
17046    #[doc = "Horizontal position innovation test ratio"]
17047    pub pos_horiz_ratio: f32,
17048    #[doc = "Vertical position innovation test ratio"]
17049    pub pos_vert_ratio: f32,
17050    #[doc = "Magnetometer innovation test ratio"]
17051    pub mag_ratio: f32,
17052    #[doc = "Height above terrain innovation test ratio"]
17053    pub hagl_ratio: f32,
17054    #[doc = "True airspeed innovation test ratio"]
17055    pub tas_ratio: f32,
17056    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
17057    pub pos_horiz_accuracy: f32,
17058    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
17059    pub pos_vert_accuracy: f32,
17060    #[doc = "Bitmap indicating which EKF outputs are valid."]
17061    pub flags: EstimatorStatusFlags,
17062}
17063impl ESTIMATOR_STATUS_DATA {
17064    pub const ENCODED_LEN: usize = 42usize;
17065    pub const DEFAULT: Self = Self {
17066        time_usec: 0_u64,
17067        vel_ratio: 0.0_f32,
17068        pos_horiz_ratio: 0.0_f32,
17069        pos_vert_ratio: 0.0_f32,
17070        mag_ratio: 0.0_f32,
17071        hagl_ratio: 0.0_f32,
17072        tas_ratio: 0.0_f32,
17073        pos_horiz_accuracy: 0.0_f32,
17074        pos_vert_accuracy: 0.0_f32,
17075        flags: EstimatorStatusFlags::DEFAULT,
17076    };
17077    #[cfg(feature = "arbitrary")]
17078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17079        use arbitrary::{Arbitrary, Unstructured};
17080        let mut buf = [0u8; 1024];
17081        rng.fill_bytes(&mut buf);
17082        let mut unstructured = Unstructured::new(&buf);
17083        Self::arbitrary(&mut unstructured).unwrap_or_default()
17084    }
17085}
17086impl Default for ESTIMATOR_STATUS_DATA {
17087    fn default() -> Self {
17088        Self::DEFAULT.clone()
17089    }
17090}
17091impl MessageData for ESTIMATOR_STATUS_DATA {
17092    type Message = MavMessage;
17093    const ID: u32 = 230u32;
17094    const NAME: &'static str = "ESTIMATOR_STATUS";
17095    const EXTRA_CRC: u8 = 163u8;
17096    const ENCODED_LEN: usize = 42usize;
17097    fn deser(
17098        _version: MavlinkVersion,
17099        __input: &[u8],
17100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17101        let avail_len = __input.len();
17102        let mut payload_buf = [0; Self::ENCODED_LEN];
17103        let mut buf = if avail_len < Self::ENCODED_LEN {
17104            payload_buf[0..avail_len].copy_from_slice(__input);
17105            Bytes::new(&payload_buf)
17106        } else {
17107            Bytes::new(__input)
17108        };
17109        let mut __struct = Self::default();
17110        __struct.time_usec = buf.get_u64_le()?;
17111        __struct.vel_ratio = buf.get_f32_le()?;
17112        __struct.pos_horiz_ratio = buf.get_f32_le()?;
17113        __struct.pos_vert_ratio = buf.get_f32_le()?;
17114        __struct.mag_ratio = buf.get_f32_le()?;
17115        __struct.hagl_ratio = buf.get_f32_le()?;
17116        __struct.tas_ratio = buf.get_f32_le()?;
17117        __struct.pos_horiz_accuracy = buf.get_f32_le()?;
17118        __struct.pos_vert_accuracy = buf.get_f32_le()?;
17119        let tmp = buf.get_u16_le()?;
17120        __struct.flags = EstimatorStatusFlags::from_bits(
17121            tmp as <EstimatorStatusFlags as Flags>::Bits,
17122        )
17123        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17124            flag_type: "EstimatorStatusFlags",
17125            value: tmp as u64,
17126        })?;
17127        Ok(__struct)
17128    }
17129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17130        let mut __tmp = BytesMut::new(bytes);
17131        #[allow(clippy::absurd_extreme_comparisons)]
17132        #[allow(unused_comparisons)]
17133        if __tmp.remaining() < Self::ENCODED_LEN {
17134            panic!(
17135                "buffer is too small (need {} bytes, but got {})",
17136                Self::ENCODED_LEN,
17137                __tmp.remaining(),
17138            )
17139        }
17140        __tmp.put_u64_le(self.time_usec);
17141        __tmp.put_f32_le(self.vel_ratio);
17142        __tmp.put_f32_le(self.pos_horiz_ratio);
17143        __tmp.put_f32_le(self.pos_vert_ratio);
17144        __tmp.put_f32_le(self.mag_ratio);
17145        __tmp.put_f32_le(self.hagl_ratio);
17146        __tmp.put_f32_le(self.tas_ratio);
17147        __tmp.put_f32_le(self.pos_horiz_accuracy);
17148        __tmp.put_f32_le(self.pos_vert_accuracy);
17149        __tmp.put_u16_le(self.flags.bits() as u16);
17150        if matches!(version, MavlinkVersion::V2) {
17151            let len = __tmp.len();
17152            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17153        } else {
17154            __tmp.len()
17155        }
17156    }
17157}
17158#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
17159#[doc = ""]
17160#[doc = "ID: 410"]
17161#[derive(Debug, Clone, PartialEq)]
17162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17163#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17164#[cfg_attr(feature = "ts", derive(TS))]
17165#[cfg_attr(feature = "ts", ts(export))]
17166pub struct EVENT_DATA {
17167    #[doc = "Event ID (as defined in the component metadata)"]
17168    pub id: u32,
17169    #[doc = "Timestamp (time since system boot when the event happened)."]
17170    pub event_time_boot_ms: u32,
17171    #[doc = "Sequence number."]
17172    pub sequence: u16,
17173    #[doc = "Component ID"]
17174    pub destination_component: u8,
17175    #[doc = "System ID"]
17176    pub destination_system: u8,
17177    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
17178    pub log_levels: u8,
17179    #[doc = "Arguments (depend on event ID)."]
17180    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17181    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17182    pub arguments: [u8; 40],
17183}
17184impl EVENT_DATA {
17185    pub const ENCODED_LEN: usize = 53usize;
17186    pub const DEFAULT: Self = Self {
17187        id: 0_u32,
17188        event_time_boot_ms: 0_u32,
17189        sequence: 0_u16,
17190        destination_component: 0_u8,
17191        destination_system: 0_u8,
17192        log_levels: 0_u8,
17193        arguments: [0_u8; 40usize],
17194    };
17195    #[cfg(feature = "arbitrary")]
17196    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17197        use arbitrary::{Arbitrary, Unstructured};
17198        let mut buf = [0u8; 1024];
17199        rng.fill_bytes(&mut buf);
17200        let mut unstructured = Unstructured::new(&buf);
17201        Self::arbitrary(&mut unstructured).unwrap_or_default()
17202    }
17203}
17204impl Default for EVENT_DATA {
17205    fn default() -> Self {
17206        Self::DEFAULT.clone()
17207    }
17208}
17209impl MessageData for EVENT_DATA {
17210    type Message = MavMessage;
17211    const ID: u32 = 410u32;
17212    const NAME: &'static str = "EVENT";
17213    const EXTRA_CRC: u8 = 160u8;
17214    const ENCODED_LEN: usize = 53usize;
17215    fn deser(
17216        _version: MavlinkVersion,
17217        __input: &[u8],
17218    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17219        let avail_len = __input.len();
17220        let mut payload_buf = [0; Self::ENCODED_LEN];
17221        let mut buf = if avail_len < Self::ENCODED_LEN {
17222            payload_buf[0..avail_len].copy_from_slice(__input);
17223            Bytes::new(&payload_buf)
17224        } else {
17225            Bytes::new(__input)
17226        };
17227        let mut __struct = Self::default();
17228        __struct.id = buf.get_u32_le()?;
17229        __struct.event_time_boot_ms = buf.get_u32_le()?;
17230        __struct.sequence = buf.get_u16_le()?;
17231        __struct.destination_component = buf.get_u8()?;
17232        __struct.destination_system = buf.get_u8()?;
17233        __struct.log_levels = buf.get_u8()?;
17234        for v in &mut __struct.arguments {
17235            let val = buf.get_u8()?;
17236            *v = val;
17237        }
17238        Ok(__struct)
17239    }
17240    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17241        let mut __tmp = BytesMut::new(bytes);
17242        #[allow(clippy::absurd_extreme_comparisons)]
17243        #[allow(unused_comparisons)]
17244        if __tmp.remaining() < Self::ENCODED_LEN {
17245            panic!(
17246                "buffer is too small (need {} bytes, but got {})",
17247                Self::ENCODED_LEN,
17248                __tmp.remaining(),
17249            )
17250        }
17251        __tmp.put_u32_le(self.id);
17252        __tmp.put_u32_le(self.event_time_boot_ms);
17253        __tmp.put_u16_le(self.sequence);
17254        __tmp.put_u8(self.destination_component);
17255        __tmp.put_u8(self.destination_system);
17256        __tmp.put_u8(self.log_levels);
17257        for val in &self.arguments {
17258            __tmp.put_u8(*val);
17259        }
17260        if matches!(version, MavlinkVersion::V2) {
17261            let len = __tmp.len();
17262            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17263        } else {
17264            __tmp.len()
17265        }
17266    }
17267}
17268#[doc = "Provides state for additional features."]
17269#[doc = ""]
17270#[doc = "ID: 245"]
17271#[derive(Debug, Clone, PartialEq)]
17272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17274#[cfg_attr(feature = "ts", derive(TS))]
17275#[cfg_attr(feature = "ts", ts(export))]
17276pub struct EXTENDED_SYS_STATE_DATA {
17277    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
17278    pub vtol_state: MavVtolState,
17279    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
17280    pub landed_state: MavLandedState,
17281}
17282impl EXTENDED_SYS_STATE_DATA {
17283    pub const ENCODED_LEN: usize = 2usize;
17284    pub const DEFAULT: Self = Self {
17285        vtol_state: MavVtolState::DEFAULT,
17286        landed_state: MavLandedState::DEFAULT,
17287    };
17288    #[cfg(feature = "arbitrary")]
17289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17290        use arbitrary::{Arbitrary, Unstructured};
17291        let mut buf = [0u8; 1024];
17292        rng.fill_bytes(&mut buf);
17293        let mut unstructured = Unstructured::new(&buf);
17294        Self::arbitrary(&mut unstructured).unwrap_or_default()
17295    }
17296}
17297impl Default for EXTENDED_SYS_STATE_DATA {
17298    fn default() -> Self {
17299        Self::DEFAULT.clone()
17300    }
17301}
17302impl MessageData for EXTENDED_SYS_STATE_DATA {
17303    type Message = MavMessage;
17304    const ID: u32 = 245u32;
17305    const NAME: &'static str = "EXTENDED_SYS_STATE";
17306    const EXTRA_CRC: u8 = 130u8;
17307    const ENCODED_LEN: usize = 2usize;
17308    fn deser(
17309        _version: MavlinkVersion,
17310        __input: &[u8],
17311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17312        let avail_len = __input.len();
17313        let mut payload_buf = [0; Self::ENCODED_LEN];
17314        let mut buf = if avail_len < Self::ENCODED_LEN {
17315            payload_buf[0..avail_len].copy_from_slice(__input);
17316            Bytes::new(&payload_buf)
17317        } else {
17318            Bytes::new(__input)
17319        };
17320        let mut __struct = Self::default();
17321        let tmp = buf.get_u8()?;
17322        __struct.vtol_state =
17323            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17324                enum_type: "MavVtolState",
17325                value: tmp as u64,
17326            })?;
17327        let tmp = buf.get_u8()?;
17328        __struct.landed_state =
17329            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17330                enum_type: "MavLandedState",
17331                value: tmp as u64,
17332            })?;
17333        Ok(__struct)
17334    }
17335    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17336        let mut __tmp = BytesMut::new(bytes);
17337        #[allow(clippy::absurd_extreme_comparisons)]
17338        #[allow(unused_comparisons)]
17339        if __tmp.remaining() < Self::ENCODED_LEN {
17340            panic!(
17341                "buffer is too small (need {} bytes, but got {})",
17342                Self::ENCODED_LEN,
17343                __tmp.remaining(),
17344            )
17345        }
17346        __tmp.put_u8(self.vtol_state as u8);
17347        __tmp.put_u8(self.landed_state as u8);
17348        if matches!(version, MavlinkVersion::V2) {
17349            let len = __tmp.len();
17350            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17351        } else {
17352            __tmp.len()
17353        }
17354    }
17355}
17356#[doc = "Request a current fence point from MAV."]
17357#[doc = ""]
17358#[doc = "ID: 161"]
17359#[derive(Debug, Clone, PartialEq)]
17360#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17361#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17362#[cfg_attr(feature = "ts", derive(TS))]
17363#[cfg_attr(feature = "ts", ts(export))]
17364pub struct FENCE_FETCH_POINT_DATA {
17365    #[doc = "System ID."]
17366    pub target_system: u8,
17367    #[doc = "Component ID."]
17368    pub target_component: u8,
17369    #[doc = "Point index (first point is 1, 0 is for return point)."]
17370    pub idx: u8,
17371}
17372impl FENCE_FETCH_POINT_DATA {
17373    pub const ENCODED_LEN: usize = 3usize;
17374    pub const DEFAULT: Self = Self {
17375        target_system: 0_u8,
17376        target_component: 0_u8,
17377        idx: 0_u8,
17378    };
17379    #[cfg(feature = "arbitrary")]
17380    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17381        use arbitrary::{Arbitrary, Unstructured};
17382        let mut buf = [0u8; 1024];
17383        rng.fill_bytes(&mut buf);
17384        let mut unstructured = Unstructured::new(&buf);
17385        Self::arbitrary(&mut unstructured).unwrap_or_default()
17386    }
17387}
17388impl Default for FENCE_FETCH_POINT_DATA {
17389    fn default() -> Self {
17390        Self::DEFAULT.clone()
17391    }
17392}
17393impl MessageData for FENCE_FETCH_POINT_DATA {
17394    type Message = MavMessage;
17395    const ID: u32 = 161u32;
17396    const NAME: &'static str = "FENCE_FETCH_POINT";
17397    const EXTRA_CRC: u8 = 68u8;
17398    const ENCODED_LEN: usize = 3usize;
17399    fn deser(
17400        _version: MavlinkVersion,
17401        __input: &[u8],
17402    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17403        let avail_len = __input.len();
17404        let mut payload_buf = [0; Self::ENCODED_LEN];
17405        let mut buf = if avail_len < Self::ENCODED_LEN {
17406            payload_buf[0..avail_len].copy_from_slice(__input);
17407            Bytes::new(&payload_buf)
17408        } else {
17409            Bytes::new(__input)
17410        };
17411        let mut __struct = Self::default();
17412        __struct.target_system = buf.get_u8()?;
17413        __struct.target_component = buf.get_u8()?;
17414        __struct.idx = buf.get_u8()?;
17415        Ok(__struct)
17416    }
17417    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17418        let mut __tmp = BytesMut::new(bytes);
17419        #[allow(clippy::absurd_extreme_comparisons)]
17420        #[allow(unused_comparisons)]
17421        if __tmp.remaining() < Self::ENCODED_LEN {
17422            panic!(
17423                "buffer is too small (need {} bytes, but got {})",
17424                Self::ENCODED_LEN,
17425                __tmp.remaining(),
17426            )
17427        }
17428        __tmp.put_u8(self.target_system);
17429        __tmp.put_u8(self.target_component);
17430        __tmp.put_u8(self.idx);
17431        if matches!(version, MavlinkVersion::V2) {
17432            let len = __tmp.len();
17433            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17434        } else {
17435            __tmp.len()
17436        }
17437    }
17438}
17439#[doc = "GCS."]
17440#[doc = ""]
17441#[doc = "ID: 160"]
17442#[derive(Debug, Clone, PartialEq)]
17443#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17444#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17445#[cfg_attr(feature = "ts", derive(TS))]
17446#[cfg_attr(feature = "ts", ts(export))]
17447pub struct FENCE_POINT_DATA {
17448    #[doc = "Latitude of point."]
17449    pub lat: f32,
17450    #[doc = "Longitude of point."]
17451    pub lng: f32,
17452    #[doc = "System ID."]
17453    pub target_system: u8,
17454    #[doc = "Component ID."]
17455    pub target_component: u8,
17456    #[doc = "Point index (first point is 1, 0 is for return point)."]
17457    pub idx: u8,
17458    #[doc = "Total number of points (for sanity checking)."]
17459    pub count: u8,
17460}
17461impl FENCE_POINT_DATA {
17462    pub const ENCODED_LEN: usize = 12usize;
17463    pub const DEFAULT: Self = Self {
17464        lat: 0.0_f32,
17465        lng: 0.0_f32,
17466        target_system: 0_u8,
17467        target_component: 0_u8,
17468        idx: 0_u8,
17469        count: 0_u8,
17470    };
17471    #[cfg(feature = "arbitrary")]
17472    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17473        use arbitrary::{Arbitrary, Unstructured};
17474        let mut buf = [0u8; 1024];
17475        rng.fill_bytes(&mut buf);
17476        let mut unstructured = Unstructured::new(&buf);
17477        Self::arbitrary(&mut unstructured).unwrap_or_default()
17478    }
17479}
17480impl Default for FENCE_POINT_DATA {
17481    fn default() -> Self {
17482        Self::DEFAULT.clone()
17483    }
17484}
17485impl MessageData for FENCE_POINT_DATA {
17486    type Message = MavMessage;
17487    const ID: u32 = 160u32;
17488    const NAME: &'static str = "FENCE_POINT";
17489    const EXTRA_CRC: u8 = 78u8;
17490    const ENCODED_LEN: usize = 12usize;
17491    fn deser(
17492        _version: MavlinkVersion,
17493        __input: &[u8],
17494    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17495        let avail_len = __input.len();
17496        let mut payload_buf = [0; Self::ENCODED_LEN];
17497        let mut buf = if avail_len < Self::ENCODED_LEN {
17498            payload_buf[0..avail_len].copy_from_slice(__input);
17499            Bytes::new(&payload_buf)
17500        } else {
17501            Bytes::new(__input)
17502        };
17503        let mut __struct = Self::default();
17504        __struct.lat = buf.get_f32_le()?;
17505        __struct.lng = buf.get_f32_le()?;
17506        __struct.target_system = buf.get_u8()?;
17507        __struct.target_component = buf.get_u8()?;
17508        __struct.idx = buf.get_u8()?;
17509        __struct.count = buf.get_u8()?;
17510        Ok(__struct)
17511    }
17512    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17513        let mut __tmp = BytesMut::new(bytes);
17514        #[allow(clippy::absurd_extreme_comparisons)]
17515        #[allow(unused_comparisons)]
17516        if __tmp.remaining() < Self::ENCODED_LEN {
17517            panic!(
17518                "buffer is too small (need {} bytes, but got {})",
17519                Self::ENCODED_LEN,
17520                __tmp.remaining(),
17521            )
17522        }
17523        __tmp.put_f32_le(self.lat);
17524        __tmp.put_f32_le(self.lng);
17525        __tmp.put_u8(self.target_system);
17526        __tmp.put_u8(self.target_component);
17527        __tmp.put_u8(self.idx);
17528        __tmp.put_u8(self.count);
17529        if matches!(version, MavlinkVersion::V2) {
17530            let len = __tmp.len();
17531            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17532        } else {
17533            __tmp.len()
17534        }
17535    }
17536}
17537#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
17538#[doc = ""]
17539#[doc = "ID: 162"]
17540#[derive(Debug, Clone, PartialEq)]
17541#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17542#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17543#[cfg_attr(feature = "ts", derive(TS))]
17544#[cfg_attr(feature = "ts", ts(export))]
17545pub struct FENCE_STATUS_DATA {
17546    #[doc = "Time (since boot) of last breach."]
17547    pub breach_time: u32,
17548    #[doc = "Number of fence breaches."]
17549    pub breach_count: u16,
17550    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
17551    pub breach_status: u8,
17552    #[doc = "Last breach type."]
17553    pub breach_type: FenceBreach,
17554    #[doc = "Active action to prevent fence breach"]
17555    #[cfg_attr(feature = "serde", serde(default))]
17556    pub breach_mitigation: FenceMitigate,
17557}
17558impl FENCE_STATUS_DATA {
17559    pub const ENCODED_LEN: usize = 9usize;
17560    pub const DEFAULT: Self = Self {
17561        breach_time: 0_u32,
17562        breach_count: 0_u16,
17563        breach_status: 0_u8,
17564        breach_type: FenceBreach::DEFAULT,
17565        breach_mitigation: FenceMitigate::DEFAULT,
17566    };
17567    #[cfg(feature = "arbitrary")]
17568    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17569        use arbitrary::{Arbitrary, Unstructured};
17570        let mut buf = [0u8; 1024];
17571        rng.fill_bytes(&mut buf);
17572        let mut unstructured = Unstructured::new(&buf);
17573        Self::arbitrary(&mut unstructured).unwrap_or_default()
17574    }
17575}
17576impl Default for FENCE_STATUS_DATA {
17577    fn default() -> Self {
17578        Self::DEFAULT.clone()
17579    }
17580}
17581impl MessageData for FENCE_STATUS_DATA {
17582    type Message = MavMessage;
17583    const ID: u32 = 162u32;
17584    const NAME: &'static str = "FENCE_STATUS";
17585    const EXTRA_CRC: u8 = 189u8;
17586    const ENCODED_LEN: usize = 9usize;
17587    fn deser(
17588        _version: MavlinkVersion,
17589        __input: &[u8],
17590    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17591        let avail_len = __input.len();
17592        let mut payload_buf = [0; Self::ENCODED_LEN];
17593        let mut buf = if avail_len < Self::ENCODED_LEN {
17594            payload_buf[0..avail_len].copy_from_slice(__input);
17595            Bytes::new(&payload_buf)
17596        } else {
17597            Bytes::new(__input)
17598        };
17599        let mut __struct = Self::default();
17600        __struct.breach_time = buf.get_u32_le()?;
17601        __struct.breach_count = buf.get_u16_le()?;
17602        __struct.breach_status = buf.get_u8()?;
17603        let tmp = buf.get_u8()?;
17604        __struct.breach_type =
17605            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17606                enum_type: "FenceBreach",
17607                value: tmp as u64,
17608            })?;
17609        let tmp = buf.get_u8()?;
17610        __struct.breach_mitigation =
17611            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17612                enum_type: "FenceMitigate",
17613                value: tmp as u64,
17614            })?;
17615        Ok(__struct)
17616    }
17617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17618        let mut __tmp = BytesMut::new(bytes);
17619        #[allow(clippy::absurd_extreme_comparisons)]
17620        #[allow(unused_comparisons)]
17621        if __tmp.remaining() < Self::ENCODED_LEN {
17622            panic!(
17623                "buffer is too small (need {} bytes, but got {})",
17624                Self::ENCODED_LEN,
17625                __tmp.remaining(),
17626            )
17627        }
17628        __tmp.put_u32_le(self.breach_time);
17629        __tmp.put_u16_le(self.breach_count);
17630        __tmp.put_u8(self.breach_status);
17631        __tmp.put_u8(self.breach_type as u8);
17632        if matches!(version, MavlinkVersion::V2) {
17633            __tmp.put_u8(self.breach_mitigation as u8);
17634            let len = __tmp.len();
17635            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17636        } else {
17637            __tmp.len()
17638        }
17639    }
17640}
17641#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
17642#[doc = ""]
17643#[doc = "ID: 110"]
17644#[derive(Debug, Clone, PartialEq)]
17645#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17647#[cfg_attr(feature = "ts", derive(TS))]
17648#[cfg_attr(feature = "ts", ts(export))]
17649pub struct FILE_TRANSFER_PROTOCOL_DATA {
17650    #[doc = "Network ID (0 for broadcast)"]
17651    pub target_network: u8,
17652    #[doc = "System ID (0 for broadcast)"]
17653    pub target_system: u8,
17654    #[doc = "Component ID (0 for broadcast)"]
17655    pub target_component: u8,
17656    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
17657    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17658    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17659    pub payload: [u8; 251],
17660}
17661impl FILE_TRANSFER_PROTOCOL_DATA {
17662    pub const ENCODED_LEN: usize = 254usize;
17663    pub const DEFAULT: Self = Self {
17664        target_network: 0_u8,
17665        target_system: 0_u8,
17666        target_component: 0_u8,
17667        payload: [0_u8; 251usize],
17668    };
17669    #[cfg(feature = "arbitrary")]
17670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17671        use arbitrary::{Arbitrary, Unstructured};
17672        let mut buf = [0u8; 1024];
17673        rng.fill_bytes(&mut buf);
17674        let mut unstructured = Unstructured::new(&buf);
17675        Self::arbitrary(&mut unstructured).unwrap_or_default()
17676    }
17677}
17678impl Default for FILE_TRANSFER_PROTOCOL_DATA {
17679    fn default() -> Self {
17680        Self::DEFAULT.clone()
17681    }
17682}
17683impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
17684    type Message = MavMessage;
17685    const ID: u32 = 110u32;
17686    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
17687    const EXTRA_CRC: u8 = 84u8;
17688    const ENCODED_LEN: usize = 254usize;
17689    fn deser(
17690        _version: MavlinkVersion,
17691        __input: &[u8],
17692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17693        let avail_len = __input.len();
17694        let mut payload_buf = [0; Self::ENCODED_LEN];
17695        let mut buf = if avail_len < Self::ENCODED_LEN {
17696            payload_buf[0..avail_len].copy_from_slice(__input);
17697            Bytes::new(&payload_buf)
17698        } else {
17699            Bytes::new(__input)
17700        };
17701        let mut __struct = Self::default();
17702        __struct.target_network = buf.get_u8()?;
17703        __struct.target_system = buf.get_u8()?;
17704        __struct.target_component = buf.get_u8()?;
17705        for v in &mut __struct.payload {
17706            let val = buf.get_u8()?;
17707            *v = val;
17708        }
17709        Ok(__struct)
17710    }
17711    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17712        let mut __tmp = BytesMut::new(bytes);
17713        #[allow(clippy::absurd_extreme_comparisons)]
17714        #[allow(unused_comparisons)]
17715        if __tmp.remaining() < Self::ENCODED_LEN {
17716            panic!(
17717                "buffer is too small (need {} bytes, but got {})",
17718                Self::ENCODED_LEN,
17719                __tmp.remaining(),
17720            )
17721        }
17722        __tmp.put_u8(self.target_network);
17723        __tmp.put_u8(self.target_system);
17724        __tmp.put_u8(self.target_component);
17725        for val in &self.payload {
17726            __tmp.put_u8(*val);
17727        }
17728        if matches!(version, MavlinkVersion::V2) {
17729            let len = __tmp.len();
17730            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17731        } else {
17732            __tmp.len()
17733        }
17734    }
17735}
17736#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
17737#[doc = ""]
17738#[doc = "ID: 264"]
17739#[derive(Debug, Clone, PartialEq)]
17740#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17741#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17742#[cfg_attr(feature = "ts", derive(TS))]
17743#[cfg_attr(feature = "ts", ts(export))]
17744pub struct FLIGHT_INFORMATION_DATA {
17745    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
17746    pub arming_time_utc: u64,
17747    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
17748    pub takeoff_time_utc: u64,
17749    #[doc = "Flight number. Note, field is misnamed UUID."]
17750    pub flight_uuid: u64,
17751    #[doc = "Timestamp (time since system boot)."]
17752    pub time_boot_ms: u32,
17753    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
17754    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17755    pub landing_time: u32,
17756}
17757impl FLIGHT_INFORMATION_DATA {
17758    pub const ENCODED_LEN: usize = 32usize;
17759    pub const DEFAULT: Self = Self {
17760        arming_time_utc: 0_u64,
17761        takeoff_time_utc: 0_u64,
17762        flight_uuid: 0_u64,
17763        time_boot_ms: 0_u32,
17764        landing_time: 0_u32,
17765    };
17766    #[cfg(feature = "arbitrary")]
17767    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17768        use arbitrary::{Arbitrary, Unstructured};
17769        let mut buf = [0u8; 1024];
17770        rng.fill_bytes(&mut buf);
17771        let mut unstructured = Unstructured::new(&buf);
17772        Self::arbitrary(&mut unstructured).unwrap_or_default()
17773    }
17774}
17775impl Default for FLIGHT_INFORMATION_DATA {
17776    fn default() -> Self {
17777        Self::DEFAULT.clone()
17778    }
17779}
17780impl MessageData for FLIGHT_INFORMATION_DATA {
17781    type Message = MavMessage;
17782    const ID: u32 = 264u32;
17783    const NAME: &'static str = "FLIGHT_INFORMATION";
17784    const EXTRA_CRC: u8 = 49u8;
17785    const ENCODED_LEN: usize = 32usize;
17786    fn deser(
17787        _version: MavlinkVersion,
17788        __input: &[u8],
17789    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17790        let avail_len = __input.len();
17791        let mut payload_buf = [0; Self::ENCODED_LEN];
17792        let mut buf = if avail_len < Self::ENCODED_LEN {
17793            payload_buf[0..avail_len].copy_from_slice(__input);
17794            Bytes::new(&payload_buf)
17795        } else {
17796            Bytes::new(__input)
17797        };
17798        let mut __struct = Self::default();
17799        __struct.arming_time_utc = buf.get_u64_le()?;
17800        __struct.takeoff_time_utc = buf.get_u64_le()?;
17801        __struct.flight_uuid = buf.get_u64_le()?;
17802        __struct.time_boot_ms = buf.get_u32_le()?;
17803        __struct.landing_time = buf.get_u32_le()?;
17804        Ok(__struct)
17805    }
17806    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17807        let mut __tmp = BytesMut::new(bytes);
17808        #[allow(clippy::absurd_extreme_comparisons)]
17809        #[allow(unused_comparisons)]
17810        if __tmp.remaining() < Self::ENCODED_LEN {
17811            panic!(
17812                "buffer is too small (need {} bytes, but got {})",
17813                Self::ENCODED_LEN,
17814                __tmp.remaining(),
17815            )
17816        }
17817        __tmp.put_u64_le(self.arming_time_utc);
17818        __tmp.put_u64_le(self.takeoff_time_utc);
17819        __tmp.put_u64_le(self.flight_uuid);
17820        __tmp.put_u32_le(self.time_boot_ms);
17821        if matches!(version, MavlinkVersion::V2) {
17822            __tmp.put_u32_le(self.landing_time);
17823            let len = __tmp.len();
17824            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17825        } else {
17826            __tmp.len()
17827        }
17828    }
17829}
17830#[doc = "Current motion information from a designated system."]
17831#[doc = ""]
17832#[doc = "ID: 144"]
17833#[derive(Debug, Clone, PartialEq)]
17834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17835#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17836#[cfg_attr(feature = "ts", derive(TS))]
17837#[cfg_attr(feature = "ts", ts(export))]
17838pub struct FOLLOW_TARGET_DATA {
17839    #[doc = "Timestamp (time since system boot)."]
17840    pub timestamp: u64,
17841    #[doc = "button states or switches of a tracker device"]
17842    pub custom_state: u64,
17843    #[doc = "Latitude (WGS84)"]
17844    pub lat: i32,
17845    #[doc = "Longitude (WGS84)"]
17846    pub lon: i32,
17847    #[doc = "Altitude (MSL)"]
17848    pub alt: f32,
17849    #[doc = "target velocity (0,0,0) for unknown"]
17850    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17851    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17852    pub vel: [f32; 3],
17853    #[doc = "linear target acceleration (0,0,0) for unknown"]
17854    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17855    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17856    pub acc: [f32; 3],
17857    #[doc = "(0 0 0 0 for unknown)"]
17858    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17859    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17860    pub attitude_q: [f32; 4],
17861    #[doc = "(0 0 0 for unknown)"]
17862    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17863    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17864    pub rates: [f32; 3],
17865    #[doc = "eph epv"]
17866    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17867    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17868    pub position_cov: [f32; 3],
17869    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
17870    pub est_capabilities: u8,
17871}
17872impl FOLLOW_TARGET_DATA {
17873    pub const ENCODED_LEN: usize = 93usize;
17874    pub const DEFAULT: Self = Self {
17875        timestamp: 0_u64,
17876        custom_state: 0_u64,
17877        lat: 0_i32,
17878        lon: 0_i32,
17879        alt: 0.0_f32,
17880        vel: [0.0_f32; 3usize],
17881        acc: [0.0_f32; 3usize],
17882        attitude_q: [0.0_f32; 4usize],
17883        rates: [0.0_f32; 3usize],
17884        position_cov: [0.0_f32; 3usize],
17885        est_capabilities: 0_u8,
17886    };
17887    #[cfg(feature = "arbitrary")]
17888    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17889        use arbitrary::{Arbitrary, Unstructured};
17890        let mut buf = [0u8; 1024];
17891        rng.fill_bytes(&mut buf);
17892        let mut unstructured = Unstructured::new(&buf);
17893        Self::arbitrary(&mut unstructured).unwrap_or_default()
17894    }
17895}
17896impl Default for FOLLOW_TARGET_DATA {
17897    fn default() -> Self {
17898        Self::DEFAULT.clone()
17899    }
17900}
17901impl MessageData for FOLLOW_TARGET_DATA {
17902    type Message = MavMessage;
17903    const ID: u32 = 144u32;
17904    const NAME: &'static str = "FOLLOW_TARGET";
17905    const EXTRA_CRC: u8 = 127u8;
17906    const ENCODED_LEN: usize = 93usize;
17907    fn deser(
17908        _version: MavlinkVersion,
17909        __input: &[u8],
17910    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17911        let avail_len = __input.len();
17912        let mut payload_buf = [0; Self::ENCODED_LEN];
17913        let mut buf = if avail_len < Self::ENCODED_LEN {
17914            payload_buf[0..avail_len].copy_from_slice(__input);
17915            Bytes::new(&payload_buf)
17916        } else {
17917            Bytes::new(__input)
17918        };
17919        let mut __struct = Self::default();
17920        __struct.timestamp = buf.get_u64_le()?;
17921        __struct.custom_state = buf.get_u64_le()?;
17922        __struct.lat = buf.get_i32_le()?;
17923        __struct.lon = buf.get_i32_le()?;
17924        __struct.alt = buf.get_f32_le()?;
17925        for v in &mut __struct.vel {
17926            let val = buf.get_f32_le()?;
17927            *v = val;
17928        }
17929        for v in &mut __struct.acc {
17930            let val = buf.get_f32_le()?;
17931            *v = val;
17932        }
17933        for v in &mut __struct.attitude_q {
17934            let val = buf.get_f32_le()?;
17935            *v = val;
17936        }
17937        for v in &mut __struct.rates {
17938            let val = buf.get_f32_le()?;
17939            *v = val;
17940        }
17941        for v in &mut __struct.position_cov {
17942            let val = buf.get_f32_le()?;
17943            *v = val;
17944        }
17945        __struct.est_capabilities = buf.get_u8()?;
17946        Ok(__struct)
17947    }
17948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17949        let mut __tmp = BytesMut::new(bytes);
17950        #[allow(clippy::absurd_extreme_comparisons)]
17951        #[allow(unused_comparisons)]
17952        if __tmp.remaining() < Self::ENCODED_LEN {
17953            panic!(
17954                "buffer is too small (need {} bytes, but got {})",
17955                Self::ENCODED_LEN,
17956                __tmp.remaining(),
17957            )
17958        }
17959        __tmp.put_u64_le(self.timestamp);
17960        __tmp.put_u64_le(self.custom_state);
17961        __tmp.put_i32_le(self.lat);
17962        __tmp.put_i32_le(self.lon);
17963        __tmp.put_f32_le(self.alt);
17964        for val in &self.vel {
17965            __tmp.put_f32_le(*val);
17966        }
17967        for val in &self.acc {
17968            __tmp.put_f32_le(*val);
17969        }
17970        for val in &self.attitude_q {
17971            __tmp.put_f32_le(*val);
17972        }
17973        for val in &self.rates {
17974            __tmp.put_f32_le(*val);
17975        }
17976        for val in &self.position_cov {
17977            __tmp.put_f32_le(*val);
17978        }
17979        __tmp.put_u8(self.est_capabilities);
17980        if matches!(version, MavlinkVersion::V2) {
17981            let len = __tmp.len();
17982            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17983        } else {
17984            __tmp.len()
17985        }
17986    }
17987}
17988#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
17989#[doc = ""]
17990#[doc = "ID: 371"]
17991#[derive(Debug, Clone, PartialEq)]
17992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17994#[cfg_attr(feature = "ts", derive(TS))]
17995#[cfg_attr(feature = "ts", ts(export))]
17996pub struct FUEL_STATUS_DATA {
17997    #[doc = "Capacity when full. Must be provided."]
17998    pub maximum_fuel: f32,
17999    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
18000    pub consumed_fuel: f32,
18001    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
18002    pub remaining_fuel: f32,
18003    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
18004    pub flow_rate: f32,
18005    #[doc = "Fuel temperature. NaN: field not provided."]
18006    pub temperature: f32,
18007    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
18008    pub fuel_type: MavFuelType,
18009    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
18010    pub id: u8,
18011    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
18012    pub percent_remaining: u8,
18013}
18014impl FUEL_STATUS_DATA {
18015    pub const ENCODED_LEN: usize = 26usize;
18016    pub const DEFAULT: Self = Self {
18017        maximum_fuel: 0.0_f32,
18018        consumed_fuel: 0.0_f32,
18019        remaining_fuel: 0.0_f32,
18020        flow_rate: 0.0_f32,
18021        temperature: 0.0_f32,
18022        fuel_type: MavFuelType::DEFAULT,
18023        id: 0_u8,
18024        percent_remaining: 0_u8,
18025    };
18026    #[cfg(feature = "arbitrary")]
18027    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18028        use arbitrary::{Arbitrary, Unstructured};
18029        let mut buf = [0u8; 1024];
18030        rng.fill_bytes(&mut buf);
18031        let mut unstructured = Unstructured::new(&buf);
18032        Self::arbitrary(&mut unstructured).unwrap_or_default()
18033    }
18034}
18035impl Default for FUEL_STATUS_DATA {
18036    fn default() -> Self {
18037        Self::DEFAULT.clone()
18038    }
18039}
18040impl MessageData for FUEL_STATUS_DATA {
18041    type Message = MavMessage;
18042    const ID: u32 = 371u32;
18043    const NAME: &'static str = "FUEL_STATUS";
18044    const EXTRA_CRC: u8 = 10u8;
18045    const ENCODED_LEN: usize = 26usize;
18046    fn deser(
18047        _version: MavlinkVersion,
18048        __input: &[u8],
18049    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18050        let avail_len = __input.len();
18051        let mut payload_buf = [0; Self::ENCODED_LEN];
18052        let mut buf = if avail_len < Self::ENCODED_LEN {
18053            payload_buf[0..avail_len].copy_from_slice(__input);
18054            Bytes::new(&payload_buf)
18055        } else {
18056            Bytes::new(__input)
18057        };
18058        let mut __struct = Self::default();
18059        __struct.maximum_fuel = buf.get_f32_le()?;
18060        __struct.consumed_fuel = buf.get_f32_le()?;
18061        __struct.remaining_fuel = buf.get_f32_le()?;
18062        __struct.flow_rate = buf.get_f32_le()?;
18063        __struct.temperature = buf.get_f32_le()?;
18064        let tmp = buf.get_u32_le()?;
18065        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
18066            ::mavlink_core::error::ParserError::InvalidEnum {
18067                enum_type: "MavFuelType",
18068                value: tmp as u64,
18069            },
18070        )?;
18071        __struct.id = buf.get_u8()?;
18072        __struct.percent_remaining = buf.get_u8()?;
18073        Ok(__struct)
18074    }
18075    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18076        let mut __tmp = BytesMut::new(bytes);
18077        #[allow(clippy::absurd_extreme_comparisons)]
18078        #[allow(unused_comparisons)]
18079        if __tmp.remaining() < Self::ENCODED_LEN {
18080            panic!(
18081                "buffer is too small (need {} bytes, but got {})",
18082                Self::ENCODED_LEN,
18083                __tmp.remaining(),
18084            )
18085        }
18086        __tmp.put_f32_le(self.maximum_fuel);
18087        __tmp.put_f32_le(self.consumed_fuel);
18088        __tmp.put_f32_le(self.remaining_fuel);
18089        __tmp.put_f32_le(self.flow_rate);
18090        __tmp.put_f32_le(self.temperature);
18091        __tmp.put_u32_le(self.fuel_type as u32);
18092        __tmp.put_u8(self.id);
18093        __tmp.put_u8(self.percent_remaining);
18094        if matches!(version, MavlinkVersion::V2) {
18095            let len = __tmp.len();
18096            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18097        } else {
18098            __tmp.len()
18099        }
18100    }
18101}
18102#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
18103#[doc = ""]
18104#[doc = "ID: 373"]
18105#[derive(Debug, Clone, PartialEq)]
18106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18107#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18108#[cfg_attr(feature = "ts", derive(TS))]
18109#[cfg_attr(feature = "ts", ts(export))]
18110pub struct GENERATOR_STATUS_DATA {
18111    #[doc = "Status flags."]
18112    pub status: MavGeneratorStatusFlag,
18113    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
18114    pub battery_current: f32,
18115    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
18116    pub load_current: f32,
18117    #[doc = "The power being generated. NaN: field not provided"]
18118    pub power_generated: f32,
18119    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
18120    pub bus_voltage: f32,
18121    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
18122    pub bat_current_setpoint: f32,
18123    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
18124    pub runtime: u32,
18125    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
18126    pub time_until_maintenance: i32,
18127    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
18128    pub generator_speed: u16,
18129    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
18130    pub rectifier_temperature: i16,
18131    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
18132    pub generator_temperature: i16,
18133}
18134impl GENERATOR_STATUS_DATA {
18135    pub const ENCODED_LEN: usize = 42usize;
18136    pub const DEFAULT: Self = Self {
18137        status: MavGeneratorStatusFlag::DEFAULT,
18138        battery_current: 0.0_f32,
18139        load_current: 0.0_f32,
18140        power_generated: 0.0_f32,
18141        bus_voltage: 0.0_f32,
18142        bat_current_setpoint: 0.0_f32,
18143        runtime: 0_u32,
18144        time_until_maintenance: 0_i32,
18145        generator_speed: 0_u16,
18146        rectifier_temperature: 0_i16,
18147        generator_temperature: 0_i16,
18148    };
18149    #[cfg(feature = "arbitrary")]
18150    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18151        use arbitrary::{Arbitrary, Unstructured};
18152        let mut buf = [0u8; 1024];
18153        rng.fill_bytes(&mut buf);
18154        let mut unstructured = Unstructured::new(&buf);
18155        Self::arbitrary(&mut unstructured).unwrap_or_default()
18156    }
18157}
18158impl Default for GENERATOR_STATUS_DATA {
18159    fn default() -> Self {
18160        Self::DEFAULT.clone()
18161    }
18162}
18163impl MessageData for GENERATOR_STATUS_DATA {
18164    type Message = MavMessage;
18165    const ID: u32 = 373u32;
18166    const NAME: &'static str = "GENERATOR_STATUS";
18167    const EXTRA_CRC: u8 = 117u8;
18168    const ENCODED_LEN: usize = 42usize;
18169    fn deser(
18170        _version: MavlinkVersion,
18171        __input: &[u8],
18172    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18173        let avail_len = __input.len();
18174        let mut payload_buf = [0; Self::ENCODED_LEN];
18175        let mut buf = if avail_len < Self::ENCODED_LEN {
18176            payload_buf[0..avail_len].copy_from_slice(__input);
18177            Bytes::new(&payload_buf)
18178        } else {
18179            Bytes::new(__input)
18180        };
18181        let mut __struct = Self::default();
18182        let tmp = buf.get_u64_le()?;
18183        __struct.status =
18184            MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
18185                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18186                    flag_type: "MavGeneratorStatusFlag",
18187                    value: tmp as u64,
18188                })?;
18189        __struct.battery_current = buf.get_f32_le()?;
18190        __struct.load_current = buf.get_f32_le()?;
18191        __struct.power_generated = buf.get_f32_le()?;
18192        __struct.bus_voltage = buf.get_f32_le()?;
18193        __struct.bat_current_setpoint = buf.get_f32_le()?;
18194        __struct.runtime = buf.get_u32_le()?;
18195        __struct.time_until_maintenance = buf.get_i32_le()?;
18196        __struct.generator_speed = buf.get_u16_le()?;
18197        __struct.rectifier_temperature = buf.get_i16_le()?;
18198        __struct.generator_temperature = buf.get_i16_le()?;
18199        Ok(__struct)
18200    }
18201    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18202        let mut __tmp = BytesMut::new(bytes);
18203        #[allow(clippy::absurd_extreme_comparisons)]
18204        #[allow(unused_comparisons)]
18205        if __tmp.remaining() < Self::ENCODED_LEN {
18206            panic!(
18207                "buffer is too small (need {} bytes, but got {})",
18208                Self::ENCODED_LEN,
18209                __tmp.remaining(),
18210            )
18211        }
18212        __tmp.put_u64_le(self.status.bits() as u64);
18213        __tmp.put_f32_le(self.battery_current);
18214        __tmp.put_f32_le(self.load_current);
18215        __tmp.put_f32_le(self.power_generated);
18216        __tmp.put_f32_le(self.bus_voltage);
18217        __tmp.put_f32_le(self.bat_current_setpoint);
18218        __tmp.put_u32_le(self.runtime);
18219        __tmp.put_i32_le(self.time_until_maintenance);
18220        __tmp.put_u16_le(self.generator_speed);
18221        __tmp.put_i16_le(self.rectifier_temperature);
18222        __tmp.put_i16_le(self.generator_temperature);
18223        if matches!(version, MavlinkVersion::V2) {
18224            let len = __tmp.len();
18225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18226        } else {
18227            __tmp.len()
18228        }
18229    }
18230}
18231#[doc = "Control message for rate gimbal."]
18232#[doc = ""]
18233#[doc = "ID: 201"]
18234#[derive(Debug, Clone, PartialEq)]
18235#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18237#[cfg_attr(feature = "ts", derive(TS))]
18238#[cfg_attr(feature = "ts", ts(export))]
18239pub struct GIMBAL_CONTROL_DATA {
18240    #[doc = "Demanded angular rate X."]
18241    pub demanded_rate_x: f32,
18242    #[doc = "Demanded angular rate Y."]
18243    pub demanded_rate_y: f32,
18244    #[doc = "Demanded angular rate Z."]
18245    pub demanded_rate_z: f32,
18246    #[doc = "System ID."]
18247    pub target_system: u8,
18248    #[doc = "Component ID."]
18249    pub target_component: u8,
18250}
18251impl GIMBAL_CONTROL_DATA {
18252    pub const ENCODED_LEN: usize = 14usize;
18253    pub const DEFAULT: Self = Self {
18254        demanded_rate_x: 0.0_f32,
18255        demanded_rate_y: 0.0_f32,
18256        demanded_rate_z: 0.0_f32,
18257        target_system: 0_u8,
18258        target_component: 0_u8,
18259    };
18260    #[cfg(feature = "arbitrary")]
18261    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18262        use arbitrary::{Arbitrary, Unstructured};
18263        let mut buf = [0u8; 1024];
18264        rng.fill_bytes(&mut buf);
18265        let mut unstructured = Unstructured::new(&buf);
18266        Self::arbitrary(&mut unstructured).unwrap_or_default()
18267    }
18268}
18269impl Default for GIMBAL_CONTROL_DATA {
18270    fn default() -> Self {
18271        Self::DEFAULT.clone()
18272    }
18273}
18274impl MessageData for GIMBAL_CONTROL_DATA {
18275    type Message = MavMessage;
18276    const ID: u32 = 201u32;
18277    const NAME: &'static str = "GIMBAL_CONTROL";
18278    const EXTRA_CRC: u8 = 205u8;
18279    const ENCODED_LEN: usize = 14usize;
18280    fn deser(
18281        _version: MavlinkVersion,
18282        __input: &[u8],
18283    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18284        let avail_len = __input.len();
18285        let mut payload_buf = [0; Self::ENCODED_LEN];
18286        let mut buf = if avail_len < Self::ENCODED_LEN {
18287            payload_buf[0..avail_len].copy_from_slice(__input);
18288            Bytes::new(&payload_buf)
18289        } else {
18290            Bytes::new(__input)
18291        };
18292        let mut __struct = Self::default();
18293        __struct.demanded_rate_x = buf.get_f32_le()?;
18294        __struct.demanded_rate_y = buf.get_f32_le()?;
18295        __struct.demanded_rate_z = buf.get_f32_le()?;
18296        __struct.target_system = buf.get_u8()?;
18297        __struct.target_component = buf.get_u8()?;
18298        Ok(__struct)
18299    }
18300    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18301        let mut __tmp = BytesMut::new(bytes);
18302        #[allow(clippy::absurd_extreme_comparisons)]
18303        #[allow(unused_comparisons)]
18304        if __tmp.remaining() < Self::ENCODED_LEN {
18305            panic!(
18306                "buffer is too small (need {} bytes, but got {})",
18307                Self::ENCODED_LEN,
18308                __tmp.remaining(),
18309            )
18310        }
18311        __tmp.put_f32_le(self.demanded_rate_x);
18312        __tmp.put_f32_le(self.demanded_rate_y);
18313        __tmp.put_f32_le(self.demanded_rate_z);
18314        __tmp.put_u8(self.target_system);
18315        __tmp.put_u8(self.target_component);
18316        if matches!(version, MavlinkVersion::V2) {
18317            let len = __tmp.len();
18318            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18319        } else {
18320            __tmp.len()
18321        }
18322    }
18323}
18324#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
18325#[doc = ""]
18326#[doc = "ID: 285"]
18327#[derive(Debug, Clone, PartialEq)]
18328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18330#[cfg_attr(feature = "ts", derive(TS))]
18331#[cfg_attr(feature = "ts", ts(export))]
18332pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
18333    #[doc = "Timestamp (time since system boot)."]
18334    pub time_boot_ms: u32,
18335    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
18336    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18337    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18338    pub q: [f32; 4],
18339    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
18340    pub angular_velocity_x: f32,
18341    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
18342    pub angular_velocity_y: f32,
18343    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
18344    pub angular_velocity_z: f32,
18345    #[doc = "Failure flags (0 for no failure)"]
18346    pub failure_flags: GimbalDeviceErrorFlags,
18347    #[doc = "Current gimbal flags set."]
18348    pub flags: GimbalDeviceFlags,
18349    #[doc = "System ID"]
18350    pub target_system: u8,
18351    #[doc = "Component ID"]
18352    pub target_component: u8,
18353    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
18354    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18355    pub delta_yaw: f32,
18356    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
18357    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18358    pub delta_yaw_velocity: f32,
18359    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
18360    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18361    pub gimbal_device_id: u8,
18362}
18363impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
18364    pub const ENCODED_LEN: usize = 49usize;
18365    pub const DEFAULT: Self = Self {
18366        time_boot_ms: 0_u32,
18367        q: [0.0_f32; 4usize],
18368        angular_velocity_x: 0.0_f32,
18369        angular_velocity_y: 0.0_f32,
18370        angular_velocity_z: 0.0_f32,
18371        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
18372        flags: GimbalDeviceFlags::DEFAULT,
18373        target_system: 0_u8,
18374        target_component: 0_u8,
18375        delta_yaw: 0.0_f32,
18376        delta_yaw_velocity: 0.0_f32,
18377        gimbal_device_id: 0_u8,
18378    };
18379    #[cfg(feature = "arbitrary")]
18380    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18381        use arbitrary::{Arbitrary, Unstructured};
18382        let mut buf = [0u8; 1024];
18383        rng.fill_bytes(&mut buf);
18384        let mut unstructured = Unstructured::new(&buf);
18385        Self::arbitrary(&mut unstructured).unwrap_or_default()
18386    }
18387}
18388impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
18389    fn default() -> Self {
18390        Self::DEFAULT.clone()
18391    }
18392}
18393impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
18394    type Message = MavMessage;
18395    const ID: u32 = 285u32;
18396    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
18397    const EXTRA_CRC: u8 = 137u8;
18398    const ENCODED_LEN: usize = 49usize;
18399    fn deser(
18400        _version: MavlinkVersion,
18401        __input: &[u8],
18402    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18403        let avail_len = __input.len();
18404        let mut payload_buf = [0; Self::ENCODED_LEN];
18405        let mut buf = if avail_len < Self::ENCODED_LEN {
18406            payload_buf[0..avail_len].copy_from_slice(__input);
18407            Bytes::new(&payload_buf)
18408        } else {
18409            Bytes::new(__input)
18410        };
18411        let mut __struct = Self::default();
18412        __struct.time_boot_ms = buf.get_u32_le()?;
18413        for v in &mut __struct.q {
18414            let val = buf.get_f32_le()?;
18415            *v = val;
18416        }
18417        __struct.angular_velocity_x = buf.get_f32_le()?;
18418        __struct.angular_velocity_y = buf.get_f32_le()?;
18419        __struct.angular_velocity_z = buf.get_f32_le()?;
18420        let tmp = buf.get_u32_le()?;
18421        __struct.failure_flags =
18422            GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
18423                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18424                    flag_type: "GimbalDeviceErrorFlags",
18425                    value: tmp as u64,
18426                })?;
18427        let tmp = buf.get_u16_le()?;
18428        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
18429            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18430                flag_type: "GimbalDeviceFlags",
18431                value: tmp as u64,
18432            })?;
18433        __struct.target_system = buf.get_u8()?;
18434        __struct.target_component = buf.get_u8()?;
18435        __struct.delta_yaw = buf.get_f32_le()?;
18436        __struct.delta_yaw_velocity = buf.get_f32_le()?;
18437        __struct.gimbal_device_id = buf.get_u8()?;
18438        Ok(__struct)
18439    }
18440    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18441        let mut __tmp = BytesMut::new(bytes);
18442        #[allow(clippy::absurd_extreme_comparisons)]
18443        #[allow(unused_comparisons)]
18444        if __tmp.remaining() < Self::ENCODED_LEN {
18445            panic!(
18446                "buffer is too small (need {} bytes, but got {})",
18447                Self::ENCODED_LEN,
18448                __tmp.remaining(),
18449            )
18450        }
18451        __tmp.put_u32_le(self.time_boot_ms);
18452        for val in &self.q {
18453            __tmp.put_f32_le(*val);
18454        }
18455        __tmp.put_f32_le(self.angular_velocity_x);
18456        __tmp.put_f32_le(self.angular_velocity_y);
18457        __tmp.put_f32_le(self.angular_velocity_z);
18458        __tmp.put_u32_le(self.failure_flags.bits() as u32);
18459        __tmp.put_u16_le(self.flags.bits() as u16);
18460        __tmp.put_u8(self.target_system);
18461        __tmp.put_u8(self.target_component);
18462        if matches!(version, MavlinkVersion::V2) {
18463            __tmp.put_f32_le(self.delta_yaw);
18464            __tmp.put_f32_le(self.delta_yaw_velocity);
18465            __tmp.put_u8(self.gimbal_device_id);
18466            let len = __tmp.len();
18467            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18468        } else {
18469            __tmp.len()
18470        }
18471    }
18472}
18473#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
18474#[doc = ""]
18475#[doc = "ID: 283"]
18476#[derive(Debug, Clone, PartialEq)]
18477#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18479#[cfg_attr(feature = "ts", derive(TS))]
18480#[cfg_attr(feature = "ts", ts(export))]
18481pub struct GIMBAL_DEVICE_INFORMATION_DATA {
18482    #[doc = "UID of gimbal hardware (0 if unknown)."]
18483    pub uid: u64,
18484    #[doc = "Timestamp (time since system boot)."]
18485    pub time_boot_ms: u32,
18486    #[doc = "0xff)."]
18487    pub firmware_version: u32,
18488    #[doc = "0xff)."]
18489    pub hardware_version: u32,
18490    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
18491    pub roll_min: f32,
18492    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
18493    pub roll_max: f32,
18494    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
18495    pub pitch_min: f32,
18496    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
18497    pub pitch_max: f32,
18498    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
18499    pub yaw_min: f32,
18500    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
18501    pub yaw_max: f32,
18502    #[doc = "Bitmap of gimbal capability flags."]
18503    pub cap_flags: GimbalDeviceCapFlags,
18504    #[doc = "Bitmap for use for gimbal-specific capability flags."]
18505    pub custom_cap_flags: u16,
18506    #[doc = "Name of the gimbal vendor."]
18507    #[cfg_attr(feature = "ts", ts(type = "string"))]
18508    pub vendor_name: CharArray<32>,
18509    #[doc = "Name of the gimbal model."]
18510    #[cfg_attr(feature = "ts", ts(type = "string"))]
18511    pub model_name: CharArray<32>,
18512    #[doc = "Custom name of the gimbal given to it by the user."]
18513    #[cfg_attr(feature = "ts", ts(type = "string"))]
18514    pub custom_name: CharArray<32>,
18515    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
18516    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18517    pub gimbal_device_id: u8,
18518}
18519impl GIMBAL_DEVICE_INFORMATION_DATA {
18520    pub const ENCODED_LEN: usize = 145usize;
18521    pub const DEFAULT: Self = Self {
18522        uid: 0_u64,
18523        time_boot_ms: 0_u32,
18524        firmware_version: 0_u32,
18525        hardware_version: 0_u32,
18526        roll_min: 0.0_f32,
18527        roll_max: 0.0_f32,
18528        pitch_min: 0.0_f32,
18529        pitch_max: 0.0_f32,
18530        yaw_min: 0.0_f32,
18531        yaw_max: 0.0_f32,
18532        cap_flags: GimbalDeviceCapFlags::DEFAULT,
18533        custom_cap_flags: 0_u16,
18534        vendor_name: CharArray::new([0_u8; 32usize]),
18535        model_name: CharArray::new([0_u8; 32usize]),
18536        custom_name: CharArray::new([0_u8; 32usize]),
18537        gimbal_device_id: 0_u8,
18538    };
18539    #[cfg(feature = "arbitrary")]
18540    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18541        use arbitrary::{Arbitrary, Unstructured};
18542        let mut buf = [0u8; 1024];
18543        rng.fill_bytes(&mut buf);
18544        let mut unstructured = Unstructured::new(&buf);
18545        Self::arbitrary(&mut unstructured).unwrap_or_default()
18546    }
18547}
18548impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
18549    fn default() -> Self {
18550        Self::DEFAULT.clone()
18551    }
18552}
18553impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
18554    type Message = MavMessage;
18555    const ID: u32 = 283u32;
18556    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
18557    const EXTRA_CRC: u8 = 74u8;
18558    const ENCODED_LEN: usize = 145usize;
18559    fn deser(
18560        _version: MavlinkVersion,
18561        __input: &[u8],
18562    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18563        let avail_len = __input.len();
18564        let mut payload_buf = [0; Self::ENCODED_LEN];
18565        let mut buf = if avail_len < Self::ENCODED_LEN {
18566            payload_buf[0..avail_len].copy_from_slice(__input);
18567            Bytes::new(&payload_buf)
18568        } else {
18569            Bytes::new(__input)
18570        };
18571        let mut __struct = Self::default();
18572        __struct.uid = buf.get_u64_le()?;
18573        __struct.time_boot_ms = buf.get_u32_le()?;
18574        __struct.firmware_version = buf.get_u32_le()?;
18575        __struct.hardware_version = buf.get_u32_le()?;
18576        __struct.roll_min = buf.get_f32_le()?;
18577        __struct.roll_max = buf.get_f32_le()?;
18578        __struct.pitch_min = buf.get_f32_le()?;
18579        __struct.pitch_max = buf.get_f32_le()?;
18580        __struct.yaw_min = buf.get_f32_le()?;
18581        __struct.yaw_max = buf.get_f32_le()?;
18582        let tmp = buf.get_u16_le()?;
18583        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
18584            tmp as <GimbalDeviceCapFlags as Flags>::Bits,
18585        )
18586        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18587            flag_type: "GimbalDeviceCapFlags",
18588            value: tmp as u64,
18589        })?;
18590        __struct.custom_cap_flags = buf.get_u16_le()?;
18591        let mut tmp = [0_u8; 32usize];
18592        for v in &mut tmp {
18593            *v = buf.get_u8()?;
18594        }
18595        __struct.vendor_name = CharArray::new(tmp);
18596        let mut tmp = [0_u8; 32usize];
18597        for v in &mut tmp {
18598            *v = buf.get_u8()?;
18599        }
18600        __struct.model_name = CharArray::new(tmp);
18601        let mut tmp = [0_u8; 32usize];
18602        for v in &mut tmp {
18603            *v = buf.get_u8()?;
18604        }
18605        __struct.custom_name = CharArray::new(tmp);
18606        __struct.gimbal_device_id = buf.get_u8()?;
18607        Ok(__struct)
18608    }
18609    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18610        let mut __tmp = BytesMut::new(bytes);
18611        #[allow(clippy::absurd_extreme_comparisons)]
18612        #[allow(unused_comparisons)]
18613        if __tmp.remaining() < Self::ENCODED_LEN {
18614            panic!(
18615                "buffer is too small (need {} bytes, but got {})",
18616                Self::ENCODED_LEN,
18617                __tmp.remaining(),
18618            )
18619        }
18620        __tmp.put_u64_le(self.uid);
18621        __tmp.put_u32_le(self.time_boot_ms);
18622        __tmp.put_u32_le(self.firmware_version);
18623        __tmp.put_u32_le(self.hardware_version);
18624        __tmp.put_f32_le(self.roll_min);
18625        __tmp.put_f32_le(self.roll_max);
18626        __tmp.put_f32_le(self.pitch_min);
18627        __tmp.put_f32_le(self.pitch_max);
18628        __tmp.put_f32_le(self.yaw_min);
18629        __tmp.put_f32_le(self.yaw_max);
18630        __tmp.put_u16_le(self.cap_flags.bits() as u16);
18631        __tmp.put_u16_le(self.custom_cap_flags);
18632        for val in &self.vendor_name {
18633            __tmp.put_u8(*val);
18634        }
18635        for val in &self.model_name {
18636            __tmp.put_u8(*val);
18637        }
18638        for val in &self.custom_name {
18639            __tmp.put_u8(*val);
18640        }
18641        if matches!(version, MavlinkVersion::V2) {
18642            __tmp.put_u8(self.gimbal_device_id);
18643            let len = __tmp.len();
18644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18645        } else {
18646            __tmp.len()
18647        }
18648    }
18649}
18650#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
18651#[doc = ""]
18652#[doc = "ID: 284"]
18653#[derive(Debug, Clone, PartialEq)]
18654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18656#[cfg_attr(feature = "ts", derive(TS))]
18657#[cfg_attr(feature = "ts", ts(export))]
18658pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
18659    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
18660    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18661    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18662    pub q: [f32; 4],
18663    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
18664    pub angular_velocity_x: f32,
18665    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
18666    pub angular_velocity_y: f32,
18667    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
18668    pub angular_velocity_z: f32,
18669    #[doc = "Low level gimbal flags."]
18670    pub flags: GimbalDeviceFlags,
18671    #[doc = "System ID"]
18672    pub target_system: u8,
18673    #[doc = "Component ID"]
18674    pub target_component: u8,
18675}
18676impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
18677    pub const ENCODED_LEN: usize = 32usize;
18678    pub const DEFAULT: Self = Self {
18679        q: [0.0_f32; 4usize],
18680        angular_velocity_x: 0.0_f32,
18681        angular_velocity_y: 0.0_f32,
18682        angular_velocity_z: 0.0_f32,
18683        flags: GimbalDeviceFlags::DEFAULT,
18684        target_system: 0_u8,
18685        target_component: 0_u8,
18686    };
18687    #[cfg(feature = "arbitrary")]
18688    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18689        use arbitrary::{Arbitrary, Unstructured};
18690        let mut buf = [0u8; 1024];
18691        rng.fill_bytes(&mut buf);
18692        let mut unstructured = Unstructured::new(&buf);
18693        Self::arbitrary(&mut unstructured).unwrap_or_default()
18694    }
18695}
18696impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
18697    fn default() -> Self {
18698        Self::DEFAULT.clone()
18699    }
18700}
18701impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
18702    type Message = MavMessage;
18703    const ID: u32 = 284u32;
18704    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
18705    const EXTRA_CRC: u8 = 99u8;
18706    const ENCODED_LEN: usize = 32usize;
18707    fn deser(
18708        _version: MavlinkVersion,
18709        __input: &[u8],
18710    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18711        let avail_len = __input.len();
18712        let mut payload_buf = [0; Self::ENCODED_LEN];
18713        let mut buf = if avail_len < Self::ENCODED_LEN {
18714            payload_buf[0..avail_len].copy_from_slice(__input);
18715            Bytes::new(&payload_buf)
18716        } else {
18717            Bytes::new(__input)
18718        };
18719        let mut __struct = Self::default();
18720        for v in &mut __struct.q {
18721            let val = buf.get_f32_le()?;
18722            *v = val;
18723        }
18724        __struct.angular_velocity_x = buf.get_f32_le()?;
18725        __struct.angular_velocity_y = buf.get_f32_le()?;
18726        __struct.angular_velocity_z = buf.get_f32_le()?;
18727        let tmp = buf.get_u16_le()?;
18728        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
18729            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18730                flag_type: "GimbalDeviceFlags",
18731                value: tmp as u64,
18732            })?;
18733        __struct.target_system = buf.get_u8()?;
18734        __struct.target_component = buf.get_u8()?;
18735        Ok(__struct)
18736    }
18737    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18738        let mut __tmp = BytesMut::new(bytes);
18739        #[allow(clippy::absurd_extreme_comparisons)]
18740        #[allow(unused_comparisons)]
18741        if __tmp.remaining() < Self::ENCODED_LEN {
18742            panic!(
18743                "buffer is too small (need {} bytes, but got {})",
18744                Self::ENCODED_LEN,
18745                __tmp.remaining(),
18746            )
18747        }
18748        for val in &self.q {
18749            __tmp.put_f32_le(*val);
18750        }
18751        __tmp.put_f32_le(self.angular_velocity_x);
18752        __tmp.put_f32_le(self.angular_velocity_y);
18753        __tmp.put_f32_le(self.angular_velocity_z);
18754        __tmp.put_u16_le(self.flags.bits() as u16);
18755        __tmp.put_u8(self.target_system);
18756        __tmp.put_u8(self.target_component);
18757        if matches!(version, MavlinkVersion::V2) {
18758            let len = __tmp.len();
18759            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18760        } else {
18761            __tmp.len()
18762        }
18763    }
18764}
18765#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
18766#[doc = ""]
18767#[doc = "ID: 280"]
18768#[derive(Debug, Clone, PartialEq)]
18769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18771#[cfg_attr(feature = "ts", derive(TS))]
18772#[cfg_attr(feature = "ts", ts(export))]
18773pub struct GIMBAL_MANAGER_INFORMATION_DATA {
18774    #[doc = "Timestamp (time since system boot)."]
18775    pub time_boot_ms: u32,
18776    #[doc = "Bitmap of gimbal capability flags."]
18777    pub cap_flags: GimbalManagerCapFlags,
18778    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
18779    pub roll_min: f32,
18780    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
18781    pub roll_max: f32,
18782    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
18783    pub pitch_min: f32,
18784    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
18785    pub pitch_max: f32,
18786    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
18787    pub yaw_min: f32,
18788    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
18789    pub yaw_max: f32,
18790    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
18791    pub gimbal_device_id: u8,
18792}
18793impl GIMBAL_MANAGER_INFORMATION_DATA {
18794    pub const ENCODED_LEN: usize = 33usize;
18795    pub const DEFAULT: Self = Self {
18796        time_boot_ms: 0_u32,
18797        cap_flags: GimbalManagerCapFlags::DEFAULT,
18798        roll_min: 0.0_f32,
18799        roll_max: 0.0_f32,
18800        pitch_min: 0.0_f32,
18801        pitch_max: 0.0_f32,
18802        yaw_min: 0.0_f32,
18803        yaw_max: 0.0_f32,
18804        gimbal_device_id: 0_u8,
18805    };
18806    #[cfg(feature = "arbitrary")]
18807    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18808        use arbitrary::{Arbitrary, Unstructured};
18809        let mut buf = [0u8; 1024];
18810        rng.fill_bytes(&mut buf);
18811        let mut unstructured = Unstructured::new(&buf);
18812        Self::arbitrary(&mut unstructured).unwrap_or_default()
18813    }
18814}
18815impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
18816    fn default() -> Self {
18817        Self::DEFAULT.clone()
18818    }
18819}
18820impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
18821    type Message = MavMessage;
18822    const ID: u32 = 280u32;
18823    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
18824    const EXTRA_CRC: u8 = 70u8;
18825    const ENCODED_LEN: usize = 33usize;
18826    fn deser(
18827        _version: MavlinkVersion,
18828        __input: &[u8],
18829    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18830        let avail_len = __input.len();
18831        let mut payload_buf = [0; Self::ENCODED_LEN];
18832        let mut buf = if avail_len < Self::ENCODED_LEN {
18833            payload_buf[0..avail_len].copy_from_slice(__input);
18834            Bytes::new(&payload_buf)
18835        } else {
18836            Bytes::new(__input)
18837        };
18838        let mut __struct = Self::default();
18839        __struct.time_boot_ms = buf.get_u32_le()?;
18840        let tmp = buf.get_u32_le()?;
18841        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
18842            tmp as <GimbalManagerCapFlags as Flags>::Bits,
18843        )
18844        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18845            flag_type: "GimbalManagerCapFlags",
18846            value: tmp as u64,
18847        })?;
18848        __struct.roll_min = buf.get_f32_le()?;
18849        __struct.roll_max = buf.get_f32_le()?;
18850        __struct.pitch_min = buf.get_f32_le()?;
18851        __struct.pitch_max = buf.get_f32_le()?;
18852        __struct.yaw_min = buf.get_f32_le()?;
18853        __struct.yaw_max = buf.get_f32_le()?;
18854        __struct.gimbal_device_id = buf.get_u8()?;
18855        Ok(__struct)
18856    }
18857    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18858        let mut __tmp = BytesMut::new(bytes);
18859        #[allow(clippy::absurd_extreme_comparisons)]
18860        #[allow(unused_comparisons)]
18861        if __tmp.remaining() < Self::ENCODED_LEN {
18862            panic!(
18863                "buffer is too small (need {} bytes, but got {})",
18864                Self::ENCODED_LEN,
18865                __tmp.remaining(),
18866            )
18867        }
18868        __tmp.put_u32_le(self.time_boot_ms);
18869        __tmp.put_u32_le(self.cap_flags.bits() as u32);
18870        __tmp.put_f32_le(self.roll_min);
18871        __tmp.put_f32_le(self.roll_max);
18872        __tmp.put_f32_le(self.pitch_min);
18873        __tmp.put_f32_le(self.pitch_max);
18874        __tmp.put_f32_le(self.yaw_min);
18875        __tmp.put_f32_le(self.yaw_max);
18876        __tmp.put_u8(self.gimbal_device_id);
18877        if matches!(version, MavlinkVersion::V2) {
18878            let len = __tmp.len();
18879            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18880        } else {
18881            __tmp.len()
18882        }
18883    }
18884}
18885#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
18886#[doc = ""]
18887#[doc = "ID: 282"]
18888#[derive(Debug, Clone, PartialEq)]
18889#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18891#[cfg_attr(feature = "ts", derive(TS))]
18892#[cfg_attr(feature = "ts", ts(export))]
18893pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
18894    #[doc = "High level gimbal manager flags to use."]
18895    pub flags: GimbalManagerFlags,
18896    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
18897    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18898    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18899    pub q: [f32; 4],
18900    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
18901    pub angular_velocity_x: f32,
18902    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
18903    pub angular_velocity_y: f32,
18904    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
18905    pub angular_velocity_z: f32,
18906    #[doc = "System ID"]
18907    pub target_system: u8,
18908    #[doc = "Component ID"]
18909    pub target_component: u8,
18910    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
18911    pub gimbal_device_id: u8,
18912}
18913impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
18914    pub const ENCODED_LEN: usize = 35usize;
18915    pub const DEFAULT: Self = Self {
18916        flags: GimbalManagerFlags::DEFAULT,
18917        q: [0.0_f32; 4usize],
18918        angular_velocity_x: 0.0_f32,
18919        angular_velocity_y: 0.0_f32,
18920        angular_velocity_z: 0.0_f32,
18921        target_system: 0_u8,
18922        target_component: 0_u8,
18923        gimbal_device_id: 0_u8,
18924    };
18925    #[cfg(feature = "arbitrary")]
18926    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18927        use arbitrary::{Arbitrary, Unstructured};
18928        let mut buf = [0u8; 1024];
18929        rng.fill_bytes(&mut buf);
18930        let mut unstructured = Unstructured::new(&buf);
18931        Self::arbitrary(&mut unstructured).unwrap_or_default()
18932    }
18933}
18934impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
18935    fn default() -> Self {
18936        Self::DEFAULT.clone()
18937    }
18938}
18939impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
18940    type Message = MavMessage;
18941    const ID: u32 = 282u32;
18942    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
18943    const EXTRA_CRC: u8 = 123u8;
18944    const ENCODED_LEN: usize = 35usize;
18945    fn deser(
18946        _version: MavlinkVersion,
18947        __input: &[u8],
18948    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18949        let avail_len = __input.len();
18950        let mut payload_buf = [0; Self::ENCODED_LEN];
18951        let mut buf = if avail_len < Self::ENCODED_LEN {
18952            payload_buf[0..avail_len].copy_from_slice(__input);
18953            Bytes::new(&payload_buf)
18954        } else {
18955            Bytes::new(__input)
18956        };
18957        let mut __struct = Self::default();
18958        let tmp = buf.get_u32_le()?;
18959        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
18960            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18961                flag_type: "GimbalManagerFlags",
18962                value: tmp as u64,
18963            })?;
18964        for v in &mut __struct.q {
18965            let val = buf.get_f32_le()?;
18966            *v = val;
18967        }
18968        __struct.angular_velocity_x = buf.get_f32_le()?;
18969        __struct.angular_velocity_y = buf.get_f32_le()?;
18970        __struct.angular_velocity_z = buf.get_f32_le()?;
18971        __struct.target_system = buf.get_u8()?;
18972        __struct.target_component = buf.get_u8()?;
18973        __struct.gimbal_device_id = buf.get_u8()?;
18974        Ok(__struct)
18975    }
18976    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18977        let mut __tmp = BytesMut::new(bytes);
18978        #[allow(clippy::absurd_extreme_comparisons)]
18979        #[allow(unused_comparisons)]
18980        if __tmp.remaining() < Self::ENCODED_LEN {
18981            panic!(
18982                "buffer is too small (need {} bytes, but got {})",
18983                Self::ENCODED_LEN,
18984                __tmp.remaining(),
18985            )
18986        }
18987        __tmp.put_u32_le(self.flags.bits() as u32);
18988        for val in &self.q {
18989            __tmp.put_f32_le(*val);
18990        }
18991        __tmp.put_f32_le(self.angular_velocity_x);
18992        __tmp.put_f32_le(self.angular_velocity_y);
18993        __tmp.put_f32_le(self.angular_velocity_z);
18994        __tmp.put_u8(self.target_system);
18995        __tmp.put_u8(self.target_component);
18996        __tmp.put_u8(self.gimbal_device_id);
18997        if matches!(version, MavlinkVersion::V2) {
18998            let len = __tmp.len();
18999            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19000        } else {
19001            __tmp.len()
19002        }
19003    }
19004}
19005#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
19006#[doc = ""]
19007#[doc = "ID: 288"]
19008#[derive(Debug, Clone, PartialEq)]
19009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19011#[cfg_attr(feature = "ts", derive(TS))]
19012#[cfg_attr(feature = "ts", ts(export))]
19013pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
19014    #[doc = "High level gimbal manager flags."]
19015    pub flags: GimbalManagerFlags,
19016    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
19017    pub pitch: f32,
19018    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
19019    pub yaw: f32,
19020    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
19021    pub pitch_rate: f32,
19022    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
19023    pub yaw_rate: f32,
19024    #[doc = "System ID"]
19025    pub target_system: u8,
19026    #[doc = "Component ID"]
19027    pub target_component: u8,
19028    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
19029    pub gimbal_device_id: u8,
19030}
19031impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
19032    pub const ENCODED_LEN: usize = 23usize;
19033    pub const DEFAULT: Self = Self {
19034        flags: GimbalManagerFlags::DEFAULT,
19035        pitch: 0.0_f32,
19036        yaw: 0.0_f32,
19037        pitch_rate: 0.0_f32,
19038        yaw_rate: 0.0_f32,
19039        target_system: 0_u8,
19040        target_component: 0_u8,
19041        gimbal_device_id: 0_u8,
19042    };
19043    #[cfg(feature = "arbitrary")]
19044    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19045        use arbitrary::{Arbitrary, Unstructured};
19046        let mut buf = [0u8; 1024];
19047        rng.fill_bytes(&mut buf);
19048        let mut unstructured = Unstructured::new(&buf);
19049        Self::arbitrary(&mut unstructured).unwrap_or_default()
19050    }
19051}
19052impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
19053    fn default() -> Self {
19054        Self::DEFAULT.clone()
19055    }
19056}
19057impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
19058    type Message = MavMessage;
19059    const ID: u32 = 288u32;
19060    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
19061    const EXTRA_CRC: u8 = 20u8;
19062    const ENCODED_LEN: usize = 23usize;
19063    fn deser(
19064        _version: MavlinkVersion,
19065        __input: &[u8],
19066    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19067        let avail_len = __input.len();
19068        let mut payload_buf = [0; Self::ENCODED_LEN];
19069        let mut buf = if avail_len < Self::ENCODED_LEN {
19070            payload_buf[0..avail_len].copy_from_slice(__input);
19071            Bytes::new(&payload_buf)
19072        } else {
19073            Bytes::new(__input)
19074        };
19075        let mut __struct = Self::default();
19076        let tmp = buf.get_u32_le()?;
19077        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
19078            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
19079                flag_type: "GimbalManagerFlags",
19080                value: tmp as u64,
19081            })?;
19082        __struct.pitch = buf.get_f32_le()?;
19083        __struct.yaw = buf.get_f32_le()?;
19084        __struct.pitch_rate = buf.get_f32_le()?;
19085        __struct.yaw_rate = buf.get_f32_le()?;
19086        __struct.target_system = buf.get_u8()?;
19087        __struct.target_component = buf.get_u8()?;
19088        __struct.gimbal_device_id = buf.get_u8()?;
19089        Ok(__struct)
19090    }
19091    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19092        let mut __tmp = BytesMut::new(bytes);
19093        #[allow(clippy::absurd_extreme_comparisons)]
19094        #[allow(unused_comparisons)]
19095        if __tmp.remaining() < Self::ENCODED_LEN {
19096            panic!(
19097                "buffer is too small (need {} bytes, but got {})",
19098                Self::ENCODED_LEN,
19099                __tmp.remaining(),
19100            )
19101        }
19102        __tmp.put_u32_le(self.flags.bits() as u32);
19103        __tmp.put_f32_le(self.pitch);
19104        __tmp.put_f32_le(self.yaw);
19105        __tmp.put_f32_le(self.pitch_rate);
19106        __tmp.put_f32_le(self.yaw_rate);
19107        __tmp.put_u8(self.target_system);
19108        __tmp.put_u8(self.target_component);
19109        __tmp.put_u8(self.gimbal_device_id);
19110        if matches!(version, MavlinkVersion::V2) {
19111            let len = __tmp.len();
19112            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19113        } else {
19114            __tmp.len()
19115        }
19116    }
19117}
19118#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
19119#[doc = ""]
19120#[doc = "ID: 287"]
19121#[derive(Debug, Clone, PartialEq)]
19122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19124#[cfg_attr(feature = "ts", derive(TS))]
19125#[cfg_attr(feature = "ts", ts(export))]
19126pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
19127    #[doc = "High level gimbal manager flags to use."]
19128    pub flags: GimbalManagerFlags,
19129    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
19130    pub pitch: f32,
19131    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
19132    pub yaw: f32,
19133    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
19134    pub pitch_rate: f32,
19135    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
19136    pub yaw_rate: f32,
19137    #[doc = "System ID"]
19138    pub target_system: u8,
19139    #[doc = "Component ID"]
19140    pub target_component: u8,
19141    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
19142    pub gimbal_device_id: u8,
19143}
19144impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
19145    pub const ENCODED_LEN: usize = 23usize;
19146    pub const DEFAULT: Self = Self {
19147        flags: GimbalManagerFlags::DEFAULT,
19148        pitch: 0.0_f32,
19149        yaw: 0.0_f32,
19150        pitch_rate: 0.0_f32,
19151        yaw_rate: 0.0_f32,
19152        target_system: 0_u8,
19153        target_component: 0_u8,
19154        gimbal_device_id: 0_u8,
19155    };
19156    #[cfg(feature = "arbitrary")]
19157    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19158        use arbitrary::{Arbitrary, Unstructured};
19159        let mut buf = [0u8; 1024];
19160        rng.fill_bytes(&mut buf);
19161        let mut unstructured = Unstructured::new(&buf);
19162        Self::arbitrary(&mut unstructured).unwrap_or_default()
19163    }
19164}
19165impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
19166    fn default() -> Self {
19167        Self::DEFAULT.clone()
19168    }
19169}
19170impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
19171    type Message = MavMessage;
19172    const ID: u32 = 287u32;
19173    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
19174    const EXTRA_CRC: u8 = 1u8;
19175    const ENCODED_LEN: usize = 23usize;
19176    fn deser(
19177        _version: MavlinkVersion,
19178        __input: &[u8],
19179    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19180        let avail_len = __input.len();
19181        let mut payload_buf = [0; Self::ENCODED_LEN];
19182        let mut buf = if avail_len < Self::ENCODED_LEN {
19183            payload_buf[0..avail_len].copy_from_slice(__input);
19184            Bytes::new(&payload_buf)
19185        } else {
19186            Bytes::new(__input)
19187        };
19188        let mut __struct = Self::default();
19189        let tmp = buf.get_u32_le()?;
19190        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
19191            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
19192                flag_type: "GimbalManagerFlags",
19193                value: tmp as u64,
19194            })?;
19195        __struct.pitch = buf.get_f32_le()?;
19196        __struct.yaw = buf.get_f32_le()?;
19197        __struct.pitch_rate = buf.get_f32_le()?;
19198        __struct.yaw_rate = buf.get_f32_le()?;
19199        __struct.target_system = buf.get_u8()?;
19200        __struct.target_component = buf.get_u8()?;
19201        __struct.gimbal_device_id = buf.get_u8()?;
19202        Ok(__struct)
19203    }
19204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19205        let mut __tmp = BytesMut::new(bytes);
19206        #[allow(clippy::absurd_extreme_comparisons)]
19207        #[allow(unused_comparisons)]
19208        if __tmp.remaining() < Self::ENCODED_LEN {
19209            panic!(
19210                "buffer is too small (need {} bytes, but got {})",
19211                Self::ENCODED_LEN,
19212                __tmp.remaining(),
19213            )
19214        }
19215        __tmp.put_u32_le(self.flags.bits() as u32);
19216        __tmp.put_f32_le(self.pitch);
19217        __tmp.put_f32_le(self.yaw);
19218        __tmp.put_f32_le(self.pitch_rate);
19219        __tmp.put_f32_le(self.yaw_rate);
19220        __tmp.put_u8(self.target_system);
19221        __tmp.put_u8(self.target_component);
19222        __tmp.put_u8(self.gimbal_device_id);
19223        if matches!(version, MavlinkVersion::V2) {
19224            let len = __tmp.len();
19225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19226        } else {
19227            __tmp.len()
19228        }
19229    }
19230}
19231#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
19232#[doc = ""]
19233#[doc = "ID: 281"]
19234#[derive(Debug, Clone, PartialEq)]
19235#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19237#[cfg_attr(feature = "ts", derive(TS))]
19238#[cfg_attr(feature = "ts", ts(export))]
19239pub struct GIMBAL_MANAGER_STATUS_DATA {
19240    #[doc = "Timestamp (time since system boot)."]
19241    pub time_boot_ms: u32,
19242    #[doc = "High level gimbal manager flags currently applied."]
19243    pub flags: GimbalManagerFlags,
19244    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
19245    pub gimbal_device_id: u8,
19246    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
19247    pub primary_control_sysid: u8,
19248    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
19249    pub primary_control_compid: u8,
19250    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
19251    pub secondary_control_sysid: u8,
19252    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
19253    pub secondary_control_compid: u8,
19254}
19255impl GIMBAL_MANAGER_STATUS_DATA {
19256    pub const ENCODED_LEN: usize = 13usize;
19257    pub const DEFAULT: Self = Self {
19258        time_boot_ms: 0_u32,
19259        flags: GimbalManagerFlags::DEFAULT,
19260        gimbal_device_id: 0_u8,
19261        primary_control_sysid: 0_u8,
19262        primary_control_compid: 0_u8,
19263        secondary_control_sysid: 0_u8,
19264        secondary_control_compid: 0_u8,
19265    };
19266    #[cfg(feature = "arbitrary")]
19267    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19268        use arbitrary::{Arbitrary, Unstructured};
19269        let mut buf = [0u8; 1024];
19270        rng.fill_bytes(&mut buf);
19271        let mut unstructured = Unstructured::new(&buf);
19272        Self::arbitrary(&mut unstructured).unwrap_or_default()
19273    }
19274}
19275impl Default for GIMBAL_MANAGER_STATUS_DATA {
19276    fn default() -> Self {
19277        Self::DEFAULT.clone()
19278    }
19279}
19280impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
19281    type Message = MavMessage;
19282    const ID: u32 = 281u32;
19283    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
19284    const EXTRA_CRC: u8 = 48u8;
19285    const ENCODED_LEN: usize = 13usize;
19286    fn deser(
19287        _version: MavlinkVersion,
19288        __input: &[u8],
19289    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19290        let avail_len = __input.len();
19291        let mut payload_buf = [0; Self::ENCODED_LEN];
19292        let mut buf = if avail_len < Self::ENCODED_LEN {
19293            payload_buf[0..avail_len].copy_from_slice(__input);
19294            Bytes::new(&payload_buf)
19295        } else {
19296            Bytes::new(__input)
19297        };
19298        let mut __struct = Self::default();
19299        __struct.time_boot_ms = buf.get_u32_le()?;
19300        let tmp = buf.get_u32_le()?;
19301        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
19302            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
19303                flag_type: "GimbalManagerFlags",
19304                value: tmp as u64,
19305            })?;
19306        __struct.gimbal_device_id = buf.get_u8()?;
19307        __struct.primary_control_sysid = buf.get_u8()?;
19308        __struct.primary_control_compid = buf.get_u8()?;
19309        __struct.secondary_control_sysid = buf.get_u8()?;
19310        __struct.secondary_control_compid = buf.get_u8()?;
19311        Ok(__struct)
19312    }
19313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19314        let mut __tmp = BytesMut::new(bytes);
19315        #[allow(clippy::absurd_extreme_comparisons)]
19316        #[allow(unused_comparisons)]
19317        if __tmp.remaining() < Self::ENCODED_LEN {
19318            panic!(
19319                "buffer is too small (need {} bytes, but got {})",
19320                Self::ENCODED_LEN,
19321                __tmp.remaining(),
19322            )
19323        }
19324        __tmp.put_u32_le(self.time_boot_ms);
19325        __tmp.put_u32_le(self.flags.bits() as u32);
19326        __tmp.put_u8(self.gimbal_device_id);
19327        __tmp.put_u8(self.primary_control_sysid);
19328        __tmp.put_u8(self.primary_control_compid);
19329        __tmp.put_u8(self.secondary_control_sysid);
19330        __tmp.put_u8(self.secondary_control_compid);
19331        if matches!(version, MavlinkVersion::V2) {
19332            let len = __tmp.len();
19333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19334        } else {
19335            __tmp.len()
19336        }
19337    }
19338}
19339#[doc = "3 axis gimbal measurements."]
19340#[doc = ""]
19341#[doc = "ID: 200"]
19342#[derive(Debug, Clone, PartialEq)]
19343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19345#[cfg_attr(feature = "ts", derive(TS))]
19346#[cfg_attr(feature = "ts", ts(export))]
19347pub struct GIMBAL_REPORT_DATA {
19348    #[doc = "Time since last update."]
19349    pub delta_time: f32,
19350    #[doc = "Delta angle X."]
19351    pub delta_angle_x: f32,
19352    #[doc = "Delta angle Y."]
19353    pub delta_angle_y: f32,
19354    #[doc = "Delta angle X."]
19355    pub delta_angle_z: f32,
19356    #[doc = "Delta velocity X."]
19357    pub delta_velocity_x: f32,
19358    #[doc = "Delta velocity Y."]
19359    pub delta_velocity_y: f32,
19360    #[doc = "Delta velocity Z."]
19361    pub delta_velocity_z: f32,
19362    #[doc = "Joint ROLL."]
19363    pub joint_roll: f32,
19364    #[doc = "Joint EL."]
19365    pub joint_el: f32,
19366    #[doc = "Joint AZ."]
19367    pub joint_az: f32,
19368    #[doc = "System ID."]
19369    pub target_system: u8,
19370    #[doc = "Component ID."]
19371    pub target_component: u8,
19372}
19373impl GIMBAL_REPORT_DATA {
19374    pub const ENCODED_LEN: usize = 42usize;
19375    pub const DEFAULT: Self = Self {
19376        delta_time: 0.0_f32,
19377        delta_angle_x: 0.0_f32,
19378        delta_angle_y: 0.0_f32,
19379        delta_angle_z: 0.0_f32,
19380        delta_velocity_x: 0.0_f32,
19381        delta_velocity_y: 0.0_f32,
19382        delta_velocity_z: 0.0_f32,
19383        joint_roll: 0.0_f32,
19384        joint_el: 0.0_f32,
19385        joint_az: 0.0_f32,
19386        target_system: 0_u8,
19387        target_component: 0_u8,
19388    };
19389    #[cfg(feature = "arbitrary")]
19390    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19391        use arbitrary::{Arbitrary, Unstructured};
19392        let mut buf = [0u8; 1024];
19393        rng.fill_bytes(&mut buf);
19394        let mut unstructured = Unstructured::new(&buf);
19395        Self::arbitrary(&mut unstructured).unwrap_or_default()
19396    }
19397}
19398impl Default for GIMBAL_REPORT_DATA {
19399    fn default() -> Self {
19400        Self::DEFAULT.clone()
19401    }
19402}
19403impl MessageData for GIMBAL_REPORT_DATA {
19404    type Message = MavMessage;
19405    const ID: u32 = 200u32;
19406    const NAME: &'static str = "GIMBAL_REPORT";
19407    const EXTRA_CRC: u8 = 134u8;
19408    const ENCODED_LEN: usize = 42usize;
19409    fn deser(
19410        _version: MavlinkVersion,
19411        __input: &[u8],
19412    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19413        let avail_len = __input.len();
19414        let mut payload_buf = [0; Self::ENCODED_LEN];
19415        let mut buf = if avail_len < Self::ENCODED_LEN {
19416            payload_buf[0..avail_len].copy_from_slice(__input);
19417            Bytes::new(&payload_buf)
19418        } else {
19419            Bytes::new(__input)
19420        };
19421        let mut __struct = Self::default();
19422        __struct.delta_time = buf.get_f32_le()?;
19423        __struct.delta_angle_x = buf.get_f32_le()?;
19424        __struct.delta_angle_y = buf.get_f32_le()?;
19425        __struct.delta_angle_z = buf.get_f32_le()?;
19426        __struct.delta_velocity_x = buf.get_f32_le()?;
19427        __struct.delta_velocity_y = buf.get_f32_le()?;
19428        __struct.delta_velocity_z = buf.get_f32_le()?;
19429        __struct.joint_roll = buf.get_f32_le()?;
19430        __struct.joint_el = buf.get_f32_le()?;
19431        __struct.joint_az = buf.get_f32_le()?;
19432        __struct.target_system = buf.get_u8()?;
19433        __struct.target_component = buf.get_u8()?;
19434        Ok(__struct)
19435    }
19436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19437        let mut __tmp = BytesMut::new(bytes);
19438        #[allow(clippy::absurd_extreme_comparisons)]
19439        #[allow(unused_comparisons)]
19440        if __tmp.remaining() < Self::ENCODED_LEN {
19441            panic!(
19442                "buffer is too small (need {} bytes, but got {})",
19443                Self::ENCODED_LEN,
19444                __tmp.remaining(),
19445            )
19446        }
19447        __tmp.put_f32_le(self.delta_time);
19448        __tmp.put_f32_le(self.delta_angle_x);
19449        __tmp.put_f32_le(self.delta_angle_y);
19450        __tmp.put_f32_le(self.delta_angle_z);
19451        __tmp.put_f32_le(self.delta_velocity_x);
19452        __tmp.put_f32_le(self.delta_velocity_y);
19453        __tmp.put_f32_le(self.delta_velocity_z);
19454        __tmp.put_f32_le(self.joint_roll);
19455        __tmp.put_f32_le(self.joint_el);
19456        __tmp.put_f32_le(self.joint_az);
19457        __tmp.put_u8(self.target_system);
19458        __tmp.put_u8(self.target_component);
19459        if matches!(version, MavlinkVersion::V2) {
19460            let len = __tmp.len();
19461            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19462        } else {
19463            __tmp.len()
19464        }
19465    }
19466}
19467#[doc = "100 Hz gimbal torque command telemetry."]
19468#[doc = ""]
19469#[doc = "ID: 214"]
19470#[derive(Debug, Clone, PartialEq)]
19471#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19472#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19473#[cfg_attr(feature = "ts", derive(TS))]
19474#[cfg_attr(feature = "ts", ts(export))]
19475pub struct GIMBAL_TORQUE_CMD_REPORT_DATA {
19476    #[doc = "Roll Torque Command."]
19477    pub rl_torque_cmd: i16,
19478    #[doc = "Elevation Torque Command."]
19479    pub el_torque_cmd: i16,
19480    #[doc = "Azimuth Torque Command."]
19481    pub az_torque_cmd: i16,
19482    #[doc = "System ID."]
19483    pub target_system: u8,
19484    #[doc = "Component ID."]
19485    pub target_component: u8,
19486}
19487impl GIMBAL_TORQUE_CMD_REPORT_DATA {
19488    pub const ENCODED_LEN: usize = 8usize;
19489    pub const DEFAULT: Self = Self {
19490        rl_torque_cmd: 0_i16,
19491        el_torque_cmd: 0_i16,
19492        az_torque_cmd: 0_i16,
19493        target_system: 0_u8,
19494        target_component: 0_u8,
19495    };
19496    #[cfg(feature = "arbitrary")]
19497    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19498        use arbitrary::{Arbitrary, Unstructured};
19499        let mut buf = [0u8; 1024];
19500        rng.fill_bytes(&mut buf);
19501        let mut unstructured = Unstructured::new(&buf);
19502        Self::arbitrary(&mut unstructured).unwrap_or_default()
19503    }
19504}
19505impl Default for GIMBAL_TORQUE_CMD_REPORT_DATA {
19506    fn default() -> Self {
19507        Self::DEFAULT.clone()
19508    }
19509}
19510impl MessageData for GIMBAL_TORQUE_CMD_REPORT_DATA {
19511    type Message = MavMessage;
19512    const ID: u32 = 214u32;
19513    const NAME: &'static str = "GIMBAL_TORQUE_CMD_REPORT";
19514    const EXTRA_CRC: u8 = 69u8;
19515    const ENCODED_LEN: usize = 8usize;
19516    fn deser(
19517        _version: MavlinkVersion,
19518        __input: &[u8],
19519    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19520        let avail_len = __input.len();
19521        let mut payload_buf = [0; Self::ENCODED_LEN];
19522        let mut buf = if avail_len < Self::ENCODED_LEN {
19523            payload_buf[0..avail_len].copy_from_slice(__input);
19524            Bytes::new(&payload_buf)
19525        } else {
19526            Bytes::new(__input)
19527        };
19528        let mut __struct = Self::default();
19529        __struct.rl_torque_cmd = buf.get_i16_le()?;
19530        __struct.el_torque_cmd = buf.get_i16_le()?;
19531        __struct.az_torque_cmd = buf.get_i16_le()?;
19532        __struct.target_system = buf.get_u8()?;
19533        __struct.target_component = buf.get_u8()?;
19534        Ok(__struct)
19535    }
19536    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19537        let mut __tmp = BytesMut::new(bytes);
19538        #[allow(clippy::absurd_extreme_comparisons)]
19539        #[allow(unused_comparisons)]
19540        if __tmp.remaining() < Self::ENCODED_LEN {
19541            panic!(
19542                "buffer is too small (need {} bytes, but got {})",
19543                Self::ENCODED_LEN,
19544                __tmp.remaining(),
19545            )
19546        }
19547        __tmp.put_i16_le(self.rl_torque_cmd);
19548        __tmp.put_i16_le(self.el_torque_cmd);
19549        __tmp.put_i16_le(self.az_torque_cmd);
19550        __tmp.put_u8(self.target_system);
19551        __tmp.put_u8(self.target_component);
19552        if matches!(version, MavlinkVersion::V2) {
19553            let len = __tmp.len();
19554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19555        } else {
19556            __tmp.len()
19557        }
19558    }
19559}
19560#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
19561#[doc = ""]
19562#[doc = "ID: 33"]
19563#[derive(Debug, Clone, PartialEq)]
19564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19566#[cfg_attr(feature = "ts", derive(TS))]
19567#[cfg_attr(feature = "ts", ts(export))]
19568pub struct GLOBAL_POSITION_INT_DATA {
19569    #[doc = "Timestamp (time since system boot)."]
19570    pub time_boot_ms: u32,
19571    #[doc = "Latitude, expressed"]
19572    pub lat: i32,
19573    #[doc = "Longitude, expressed"]
19574    pub lon: i32,
19575    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
19576    pub alt: i32,
19577    #[doc = "Altitude above home"]
19578    pub relative_alt: i32,
19579    #[doc = "Ground X Speed (Latitude, positive north)"]
19580    pub vx: i16,
19581    #[doc = "Ground Y Speed (Longitude, positive east)"]
19582    pub vy: i16,
19583    #[doc = "Ground Z Speed (Altitude, positive down)"]
19584    pub vz: i16,
19585    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
19586    pub hdg: u16,
19587}
19588impl GLOBAL_POSITION_INT_DATA {
19589    pub const ENCODED_LEN: usize = 28usize;
19590    pub const DEFAULT: Self = Self {
19591        time_boot_ms: 0_u32,
19592        lat: 0_i32,
19593        lon: 0_i32,
19594        alt: 0_i32,
19595        relative_alt: 0_i32,
19596        vx: 0_i16,
19597        vy: 0_i16,
19598        vz: 0_i16,
19599        hdg: 0_u16,
19600    };
19601    #[cfg(feature = "arbitrary")]
19602    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19603        use arbitrary::{Arbitrary, Unstructured};
19604        let mut buf = [0u8; 1024];
19605        rng.fill_bytes(&mut buf);
19606        let mut unstructured = Unstructured::new(&buf);
19607        Self::arbitrary(&mut unstructured).unwrap_or_default()
19608    }
19609}
19610impl Default for GLOBAL_POSITION_INT_DATA {
19611    fn default() -> Self {
19612        Self::DEFAULT.clone()
19613    }
19614}
19615impl MessageData for GLOBAL_POSITION_INT_DATA {
19616    type Message = MavMessage;
19617    const ID: u32 = 33u32;
19618    const NAME: &'static str = "GLOBAL_POSITION_INT";
19619    const EXTRA_CRC: u8 = 104u8;
19620    const ENCODED_LEN: usize = 28usize;
19621    fn deser(
19622        _version: MavlinkVersion,
19623        __input: &[u8],
19624    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19625        let avail_len = __input.len();
19626        let mut payload_buf = [0; Self::ENCODED_LEN];
19627        let mut buf = if avail_len < Self::ENCODED_LEN {
19628            payload_buf[0..avail_len].copy_from_slice(__input);
19629            Bytes::new(&payload_buf)
19630        } else {
19631            Bytes::new(__input)
19632        };
19633        let mut __struct = Self::default();
19634        __struct.time_boot_ms = buf.get_u32_le()?;
19635        __struct.lat = buf.get_i32_le()?;
19636        __struct.lon = buf.get_i32_le()?;
19637        __struct.alt = buf.get_i32_le()?;
19638        __struct.relative_alt = buf.get_i32_le()?;
19639        __struct.vx = buf.get_i16_le()?;
19640        __struct.vy = buf.get_i16_le()?;
19641        __struct.vz = buf.get_i16_le()?;
19642        __struct.hdg = buf.get_u16_le()?;
19643        Ok(__struct)
19644    }
19645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19646        let mut __tmp = BytesMut::new(bytes);
19647        #[allow(clippy::absurd_extreme_comparisons)]
19648        #[allow(unused_comparisons)]
19649        if __tmp.remaining() < Self::ENCODED_LEN {
19650            panic!(
19651                "buffer is too small (need {} bytes, but got {})",
19652                Self::ENCODED_LEN,
19653                __tmp.remaining(),
19654            )
19655        }
19656        __tmp.put_u32_le(self.time_boot_ms);
19657        __tmp.put_i32_le(self.lat);
19658        __tmp.put_i32_le(self.lon);
19659        __tmp.put_i32_le(self.alt);
19660        __tmp.put_i32_le(self.relative_alt);
19661        __tmp.put_i16_le(self.vx);
19662        __tmp.put_i16_le(self.vy);
19663        __tmp.put_i16_le(self.vz);
19664        __tmp.put_u16_le(self.hdg);
19665        if matches!(version, MavlinkVersion::V2) {
19666            let len = __tmp.len();
19667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19668        } else {
19669            __tmp.len()
19670        }
19671    }
19672}
19673#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
19674#[doc = ""]
19675#[doc = "ID: 63"]
19676#[derive(Debug, Clone, PartialEq)]
19677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19679#[cfg_attr(feature = "ts", derive(TS))]
19680#[cfg_attr(feature = "ts", ts(export))]
19681pub struct GLOBAL_POSITION_INT_COV_DATA {
19682    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19683    pub time_usec: u64,
19684    #[doc = "Latitude"]
19685    pub lat: i32,
19686    #[doc = "Longitude"]
19687    pub lon: i32,
19688    #[doc = "Altitude in meters above MSL"]
19689    pub alt: i32,
19690    #[doc = "Altitude above ground"]
19691    pub relative_alt: i32,
19692    #[doc = "Ground X Speed (Latitude)"]
19693    pub vx: f32,
19694    #[doc = "Ground Y Speed (Longitude)"]
19695    pub vy: f32,
19696    #[doc = "Ground Z Speed (Altitude)"]
19697    pub vz: f32,
19698    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
19699    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19700    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19701    pub covariance: [f32; 36],
19702    #[doc = "Class id of the estimator this estimate originated from."]
19703    pub estimator_type: MavEstimatorType,
19704}
19705impl GLOBAL_POSITION_INT_COV_DATA {
19706    pub const ENCODED_LEN: usize = 181usize;
19707    pub const DEFAULT: Self = Self {
19708        time_usec: 0_u64,
19709        lat: 0_i32,
19710        lon: 0_i32,
19711        alt: 0_i32,
19712        relative_alt: 0_i32,
19713        vx: 0.0_f32,
19714        vy: 0.0_f32,
19715        vz: 0.0_f32,
19716        covariance: [0.0_f32; 36usize],
19717        estimator_type: MavEstimatorType::DEFAULT,
19718    };
19719    #[cfg(feature = "arbitrary")]
19720    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19721        use arbitrary::{Arbitrary, Unstructured};
19722        let mut buf = [0u8; 1024];
19723        rng.fill_bytes(&mut buf);
19724        let mut unstructured = Unstructured::new(&buf);
19725        Self::arbitrary(&mut unstructured).unwrap_or_default()
19726    }
19727}
19728impl Default for GLOBAL_POSITION_INT_COV_DATA {
19729    fn default() -> Self {
19730        Self::DEFAULT.clone()
19731    }
19732}
19733impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
19734    type Message = MavMessage;
19735    const ID: u32 = 63u32;
19736    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
19737    const EXTRA_CRC: u8 = 119u8;
19738    const ENCODED_LEN: usize = 181usize;
19739    fn deser(
19740        _version: MavlinkVersion,
19741        __input: &[u8],
19742    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19743        let avail_len = __input.len();
19744        let mut payload_buf = [0; Self::ENCODED_LEN];
19745        let mut buf = if avail_len < Self::ENCODED_LEN {
19746            payload_buf[0..avail_len].copy_from_slice(__input);
19747            Bytes::new(&payload_buf)
19748        } else {
19749            Bytes::new(__input)
19750        };
19751        let mut __struct = Self::default();
19752        __struct.time_usec = buf.get_u64_le()?;
19753        __struct.lat = buf.get_i32_le()?;
19754        __struct.lon = buf.get_i32_le()?;
19755        __struct.alt = buf.get_i32_le()?;
19756        __struct.relative_alt = buf.get_i32_le()?;
19757        __struct.vx = buf.get_f32_le()?;
19758        __struct.vy = buf.get_f32_le()?;
19759        __struct.vz = buf.get_f32_le()?;
19760        for v in &mut __struct.covariance {
19761            let val = buf.get_f32_le()?;
19762            *v = val;
19763        }
19764        let tmp = buf.get_u8()?;
19765        __struct.estimator_type =
19766            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19767                enum_type: "MavEstimatorType",
19768                value: tmp as u64,
19769            })?;
19770        Ok(__struct)
19771    }
19772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19773        let mut __tmp = BytesMut::new(bytes);
19774        #[allow(clippy::absurd_extreme_comparisons)]
19775        #[allow(unused_comparisons)]
19776        if __tmp.remaining() < Self::ENCODED_LEN {
19777            panic!(
19778                "buffer is too small (need {} bytes, but got {})",
19779                Self::ENCODED_LEN,
19780                __tmp.remaining(),
19781            )
19782        }
19783        __tmp.put_u64_le(self.time_usec);
19784        __tmp.put_i32_le(self.lat);
19785        __tmp.put_i32_le(self.lon);
19786        __tmp.put_i32_le(self.alt);
19787        __tmp.put_i32_le(self.relative_alt);
19788        __tmp.put_f32_le(self.vx);
19789        __tmp.put_f32_le(self.vy);
19790        __tmp.put_f32_le(self.vz);
19791        for val in &self.covariance {
19792            __tmp.put_f32_le(*val);
19793        }
19794        __tmp.put_u8(self.estimator_type as u8);
19795        if matches!(version, MavlinkVersion::V2) {
19796            let len = __tmp.len();
19797            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19798        } else {
19799            __tmp.len()
19800        }
19801    }
19802}
19803#[doc = "Global position/attitude estimate from a vision source."]
19804#[doc = ""]
19805#[doc = "ID: 101"]
19806#[derive(Debug, Clone, PartialEq)]
19807#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19808#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19809#[cfg_attr(feature = "ts", derive(TS))]
19810#[cfg_attr(feature = "ts", ts(export))]
19811pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
19812    #[doc = "Timestamp (UNIX time or since system boot)"]
19813    pub usec: u64,
19814    #[doc = "Global X position"]
19815    pub x: f32,
19816    #[doc = "Global Y position"]
19817    pub y: f32,
19818    #[doc = "Global Z position"]
19819    pub z: f32,
19820    #[doc = "Roll angle"]
19821    pub roll: f32,
19822    #[doc = "Pitch angle"]
19823    pub pitch: f32,
19824    #[doc = "Yaw angle"]
19825    pub yaw: f32,
19826    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
19827    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19828    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19829    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19830    pub covariance: [f32; 21],
19831    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
19832    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19833    pub reset_counter: u8,
19834}
19835impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
19836    pub const ENCODED_LEN: usize = 117usize;
19837    pub const DEFAULT: Self = Self {
19838        usec: 0_u64,
19839        x: 0.0_f32,
19840        y: 0.0_f32,
19841        z: 0.0_f32,
19842        roll: 0.0_f32,
19843        pitch: 0.0_f32,
19844        yaw: 0.0_f32,
19845        covariance: [0.0_f32; 21usize],
19846        reset_counter: 0_u8,
19847    };
19848    #[cfg(feature = "arbitrary")]
19849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19850        use arbitrary::{Arbitrary, Unstructured};
19851        let mut buf = [0u8; 1024];
19852        rng.fill_bytes(&mut buf);
19853        let mut unstructured = Unstructured::new(&buf);
19854        Self::arbitrary(&mut unstructured).unwrap_or_default()
19855    }
19856}
19857impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
19858    fn default() -> Self {
19859        Self::DEFAULT.clone()
19860    }
19861}
19862impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
19863    type Message = MavMessage;
19864    const ID: u32 = 101u32;
19865    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
19866    const EXTRA_CRC: u8 = 102u8;
19867    const ENCODED_LEN: usize = 117usize;
19868    fn deser(
19869        _version: MavlinkVersion,
19870        __input: &[u8],
19871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19872        let avail_len = __input.len();
19873        let mut payload_buf = [0; Self::ENCODED_LEN];
19874        let mut buf = if avail_len < Self::ENCODED_LEN {
19875            payload_buf[0..avail_len].copy_from_slice(__input);
19876            Bytes::new(&payload_buf)
19877        } else {
19878            Bytes::new(__input)
19879        };
19880        let mut __struct = Self::default();
19881        __struct.usec = buf.get_u64_le()?;
19882        __struct.x = buf.get_f32_le()?;
19883        __struct.y = buf.get_f32_le()?;
19884        __struct.z = buf.get_f32_le()?;
19885        __struct.roll = buf.get_f32_le()?;
19886        __struct.pitch = buf.get_f32_le()?;
19887        __struct.yaw = buf.get_f32_le()?;
19888        for v in &mut __struct.covariance {
19889            let val = buf.get_f32_le()?;
19890            *v = val;
19891        }
19892        __struct.reset_counter = buf.get_u8()?;
19893        Ok(__struct)
19894    }
19895    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19896        let mut __tmp = BytesMut::new(bytes);
19897        #[allow(clippy::absurd_extreme_comparisons)]
19898        #[allow(unused_comparisons)]
19899        if __tmp.remaining() < Self::ENCODED_LEN {
19900            panic!(
19901                "buffer is too small (need {} bytes, but got {})",
19902                Self::ENCODED_LEN,
19903                __tmp.remaining(),
19904            )
19905        }
19906        __tmp.put_u64_le(self.usec);
19907        __tmp.put_f32_le(self.x);
19908        __tmp.put_f32_le(self.y);
19909        __tmp.put_f32_le(self.z);
19910        __tmp.put_f32_le(self.roll);
19911        __tmp.put_f32_le(self.pitch);
19912        __tmp.put_f32_le(self.yaw);
19913        if matches!(version, MavlinkVersion::V2) {
19914            for val in &self.covariance {
19915                __tmp.put_f32_le(*val);
19916            }
19917            __tmp.put_u8(self.reset_counter);
19918            let len = __tmp.len();
19919            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19920        } else {
19921            __tmp.len()
19922        }
19923    }
19924}
19925#[doc = "Request a GOPRO_COMMAND response from the GoPro."]
19926#[doc = ""]
19927#[doc = "ID: 216"]
19928#[derive(Debug, Clone, PartialEq)]
19929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19931#[cfg_attr(feature = "ts", derive(TS))]
19932#[cfg_attr(feature = "ts", ts(export))]
19933pub struct GOPRO_GET_REQUEST_DATA {
19934    #[doc = "System ID."]
19935    pub target_system: u8,
19936    #[doc = "Component ID."]
19937    pub target_component: u8,
19938    #[doc = "Command ID."]
19939    pub cmd_id: GoproCommand,
19940}
19941impl GOPRO_GET_REQUEST_DATA {
19942    pub const ENCODED_LEN: usize = 3usize;
19943    pub const DEFAULT: Self = Self {
19944        target_system: 0_u8,
19945        target_component: 0_u8,
19946        cmd_id: GoproCommand::DEFAULT,
19947    };
19948    #[cfg(feature = "arbitrary")]
19949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19950        use arbitrary::{Arbitrary, Unstructured};
19951        let mut buf = [0u8; 1024];
19952        rng.fill_bytes(&mut buf);
19953        let mut unstructured = Unstructured::new(&buf);
19954        Self::arbitrary(&mut unstructured).unwrap_or_default()
19955    }
19956}
19957impl Default for GOPRO_GET_REQUEST_DATA {
19958    fn default() -> Self {
19959        Self::DEFAULT.clone()
19960    }
19961}
19962impl MessageData for GOPRO_GET_REQUEST_DATA {
19963    type Message = MavMessage;
19964    const ID: u32 = 216u32;
19965    const NAME: &'static str = "GOPRO_GET_REQUEST";
19966    const EXTRA_CRC: u8 = 50u8;
19967    const ENCODED_LEN: usize = 3usize;
19968    fn deser(
19969        _version: MavlinkVersion,
19970        __input: &[u8],
19971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19972        let avail_len = __input.len();
19973        let mut payload_buf = [0; Self::ENCODED_LEN];
19974        let mut buf = if avail_len < Self::ENCODED_LEN {
19975            payload_buf[0..avail_len].copy_from_slice(__input);
19976            Bytes::new(&payload_buf)
19977        } else {
19978            Bytes::new(__input)
19979        };
19980        let mut __struct = Self::default();
19981        __struct.target_system = buf.get_u8()?;
19982        __struct.target_component = buf.get_u8()?;
19983        let tmp = buf.get_u8()?;
19984        __struct.cmd_id =
19985            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19986                enum_type: "GoproCommand",
19987                value: tmp as u64,
19988            })?;
19989        Ok(__struct)
19990    }
19991    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19992        let mut __tmp = BytesMut::new(bytes);
19993        #[allow(clippy::absurd_extreme_comparisons)]
19994        #[allow(unused_comparisons)]
19995        if __tmp.remaining() < Self::ENCODED_LEN {
19996            panic!(
19997                "buffer is too small (need {} bytes, but got {})",
19998                Self::ENCODED_LEN,
19999                __tmp.remaining(),
20000            )
20001        }
20002        __tmp.put_u8(self.target_system);
20003        __tmp.put_u8(self.target_component);
20004        __tmp.put_u8(self.cmd_id as u8);
20005        if matches!(version, MavlinkVersion::V2) {
20006            let len = __tmp.len();
20007            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20008        } else {
20009            __tmp.len()
20010        }
20011    }
20012}
20013#[doc = "Response from a GOPRO_COMMAND get request."]
20014#[doc = ""]
20015#[doc = "ID: 217"]
20016#[derive(Debug, Clone, PartialEq)]
20017#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20019#[cfg_attr(feature = "ts", derive(TS))]
20020#[cfg_attr(feature = "ts", ts(export))]
20021pub struct GOPRO_GET_RESPONSE_DATA {
20022    #[doc = "Command ID."]
20023    pub cmd_id: GoproCommand,
20024    #[doc = "Status."]
20025    pub status: GoproRequestStatus,
20026    #[doc = "Value."]
20027    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20028    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20029    pub value: [u8; 4],
20030}
20031impl GOPRO_GET_RESPONSE_DATA {
20032    pub const ENCODED_LEN: usize = 6usize;
20033    pub const DEFAULT: Self = Self {
20034        cmd_id: GoproCommand::DEFAULT,
20035        status: GoproRequestStatus::DEFAULT,
20036        value: [0_u8; 4usize],
20037    };
20038    #[cfg(feature = "arbitrary")]
20039    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20040        use arbitrary::{Arbitrary, Unstructured};
20041        let mut buf = [0u8; 1024];
20042        rng.fill_bytes(&mut buf);
20043        let mut unstructured = Unstructured::new(&buf);
20044        Self::arbitrary(&mut unstructured).unwrap_or_default()
20045    }
20046}
20047impl Default for GOPRO_GET_RESPONSE_DATA {
20048    fn default() -> Self {
20049        Self::DEFAULT.clone()
20050    }
20051}
20052impl MessageData for GOPRO_GET_RESPONSE_DATA {
20053    type Message = MavMessage;
20054    const ID: u32 = 217u32;
20055    const NAME: &'static str = "GOPRO_GET_RESPONSE";
20056    const EXTRA_CRC: u8 = 202u8;
20057    const ENCODED_LEN: usize = 6usize;
20058    fn deser(
20059        _version: MavlinkVersion,
20060        __input: &[u8],
20061    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20062        let avail_len = __input.len();
20063        let mut payload_buf = [0; Self::ENCODED_LEN];
20064        let mut buf = if avail_len < Self::ENCODED_LEN {
20065            payload_buf[0..avail_len].copy_from_slice(__input);
20066            Bytes::new(&payload_buf)
20067        } else {
20068            Bytes::new(__input)
20069        };
20070        let mut __struct = Self::default();
20071        let tmp = buf.get_u8()?;
20072        __struct.cmd_id =
20073            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20074                enum_type: "GoproCommand",
20075                value: tmp as u64,
20076            })?;
20077        let tmp = buf.get_u8()?;
20078        __struct.status =
20079            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20080                enum_type: "GoproRequestStatus",
20081                value: tmp as u64,
20082            })?;
20083        for v in &mut __struct.value {
20084            let val = buf.get_u8()?;
20085            *v = val;
20086        }
20087        Ok(__struct)
20088    }
20089    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20090        let mut __tmp = BytesMut::new(bytes);
20091        #[allow(clippy::absurd_extreme_comparisons)]
20092        #[allow(unused_comparisons)]
20093        if __tmp.remaining() < Self::ENCODED_LEN {
20094            panic!(
20095                "buffer is too small (need {} bytes, but got {})",
20096                Self::ENCODED_LEN,
20097                __tmp.remaining(),
20098            )
20099        }
20100        __tmp.put_u8(self.cmd_id as u8);
20101        __tmp.put_u8(self.status as u8);
20102        for val in &self.value {
20103            __tmp.put_u8(*val);
20104        }
20105        if matches!(version, MavlinkVersion::V2) {
20106            let len = __tmp.len();
20107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20108        } else {
20109            __tmp.len()
20110        }
20111    }
20112}
20113#[doc = "Heartbeat from a HeroBus attached GoPro."]
20114#[doc = ""]
20115#[doc = "ID: 215"]
20116#[derive(Debug, Clone, PartialEq)]
20117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20119#[cfg_attr(feature = "ts", derive(TS))]
20120#[cfg_attr(feature = "ts", ts(export))]
20121pub struct GOPRO_HEARTBEAT_DATA {
20122    #[doc = "Status."]
20123    pub status: GoproHeartbeatStatus,
20124    #[doc = "Current capture mode."]
20125    pub capture_mode: GoproCaptureMode,
20126    #[doc = "Additional status bits."]
20127    pub flags: GoproHeartbeatFlags,
20128}
20129impl GOPRO_HEARTBEAT_DATA {
20130    pub const ENCODED_LEN: usize = 3usize;
20131    pub const DEFAULT: Self = Self {
20132        status: GoproHeartbeatStatus::DEFAULT,
20133        capture_mode: GoproCaptureMode::DEFAULT,
20134        flags: GoproHeartbeatFlags::DEFAULT,
20135    };
20136    #[cfg(feature = "arbitrary")]
20137    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20138        use arbitrary::{Arbitrary, Unstructured};
20139        let mut buf = [0u8; 1024];
20140        rng.fill_bytes(&mut buf);
20141        let mut unstructured = Unstructured::new(&buf);
20142        Self::arbitrary(&mut unstructured).unwrap_or_default()
20143    }
20144}
20145impl Default for GOPRO_HEARTBEAT_DATA {
20146    fn default() -> Self {
20147        Self::DEFAULT.clone()
20148    }
20149}
20150impl MessageData for GOPRO_HEARTBEAT_DATA {
20151    type Message = MavMessage;
20152    const ID: u32 = 215u32;
20153    const NAME: &'static str = "GOPRO_HEARTBEAT";
20154    const EXTRA_CRC: u8 = 101u8;
20155    const ENCODED_LEN: usize = 3usize;
20156    fn deser(
20157        _version: MavlinkVersion,
20158        __input: &[u8],
20159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20160        let avail_len = __input.len();
20161        let mut payload_buf = [0; Self::ENCODED_LEN];
20162        let mut buf = if avail_len < Self::ENCODED_LEN {
20163            payload_buf[0..avail_len].copy_from_slice(__input);
20164            Bytes::new(&payload_buf)
20165        } else {
20166            Bytes::new(__input)
20167        };
20168        let mut __struct = Self::default();
20169        let tmp = buf.get_u8()?;
20170        __struct.status =
20171            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20172                enum_type: "GoproHeartbeatStatus",
20173                value: tmp as u64,
20174            })?;
20175        let tmp = buf.get_u8()?;
20176        __struct.capture_mode =
20177            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20178                enum_type: "GoproCaptureMode",
20179                value: tmp as u64,
20180            })?;
20181        let tmp = buf.get_u8()?;
20182        __struct.flags = GoproHeartbeatFlags::from_bits(
20183            tmp as <GoproHeartbeatFlags as Flags>::Bits,
20184        )
20185        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
20186            flag_type: "GoproHeartbeatFlags",
20187            value: tmp as u64,
20188        })?;
20189        Ok(__struct)
20190    }
20191    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20192        let mut __tmp = BytesMut::new(bytes);
20193        #[allow(clippy::absurd_extreme_comparisons)]
20194        #[allow(unused_comparisons)]
20195        if __tmp.remaining() < Self::ENCODED_LEN {
20196            panic!(
20197                "buffer is too small (need {} bytes, but got {})",
20198                Self::ENCODED_LEN,
20199                __tmp.remaining(),
20200            )
20201        }
20202        __tmp.put_u8(self.status as u8);
20203        __tmp.put_u8(self.capture_mode as u8);
20204        __tmp.put_u8(self.flags.bits() as u8);
20205        if matches!(version, MavlinkVersion::V2) {
20206            let len = __tmp.len();
20207            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20208        } else {
20209            __tmp.len()
20210        }
20211    }
20212}
20213#[doc = "Request to set a GOPRO_COMMAND with a desired."]
20214#[doc = ""]
20215#[doc = "ID: 218"]
20216#[derive(Debug, Clone, PartialEq)]
20217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20219#[cfg_attr(feature = "ts", derive(TS))]
20220#[cfg_attr(feature = "ts", ts(export))]
20221pub struct GOPRO_SET_REQUEST_DATA {
20222    #[doc = "System ID."]
20223    pub target_system: u8,
20224    #[doc = "Component ID."]
20225    pub target_component: u8,
20226    #[doc = "Command ID."]
20227    pub cmd_id: GoproCommand,
20228    #[doc = "Value."]
20229    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20230    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20231    pub value: [u8; 4],
20232}
20233impl GOPRO_SET_REQUEST_DATA {
20234    pub const ENCODED_LEN: usize = 7usize;
20235    pub const DEFAULT: Self = Self {
20236        target_system: 0_u8,
20237        target_component: 0_u8,
20238        cmd_id: GoproCommand::DEFAULT,
20239        value: [0_u8; 4usize],
20240    };
20241    #[cfg(feature = "arbitrary")]
20242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20243        use arbitrary::{Arbitrary, Unstructured};
20244        let mut buf = [0u8; 1024];
20245        rng.fill_bytes(&mut buf);
20246        let mut unstructured = Unstructured::new(&buf);
20247        Self::arbitrary(&mut unstructured).unwrap_or_default()
20248    }
20249}
20250impl Default for GOPRO_SET_REQUEST_DATA {
20251    fn default() -> Self {
20252        Self::DEFAULT.clone()
20253    }
20254}
20255impl MessageData for GOPRO_SET_REQUEST_DATA {
20256    type Message = MavMessage;
20257    const ID: u32 = 218u32;
20258    const NAME: &'static str = "GOPRO_SET_REQUEST";
20259    const EXTRA_CRC: u8 = 17u8;
20260    const ENCODED_LEN: usize = 7usize;
20261    fn deser(
20262        _version: MavlinkVersion,
20263        __input: &[u8],
20264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20265        let avail_len = __input.len();
20266        let mut payload_buf = [0; Self::ENCODED_LEN];
20267        let mut buf = if avail_len < Self::ENCODED_LEN {
20268            payload_buf[0..avail_len].copy_from_slice(__input);
20269            Bytes::new(&payload_buf)
20270        } else {
20271            Bytes::new(__input)
20272        };
20273        let mut __struct = Self::default();
20274        __struct.target_system = buf.get_u8()?;
20275        __struct.target_component = buf.get_u8()?;
20276        let tmp = buf.get_u8()?;
20277        __struct.cmd_id =
20278            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20279                enum_type: "GoproCommand",
20280                value: tmp as u64,
20281            })?;
20282        for v in &mut __struct.value {
20283            let val = buf.get_u8()?;
20284            *v = val;
20285        }
20286        Ok(__struct)
20287    }
20288    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20289        let mut __tmp = BytesMut::new(bytes);
20290        #[allow(clippy::absurd_extreme_comparisons)]
20291        #[allow(unused_comparisons)]
20292        if __tmp.remaining() < Self::ENCODED_LEN {
20293            panic!(
20294                "buffer is too small (need {} bytes, but got {})",
20295                Self::ENCODED_LEN,
20296                __tmp.remaining(),
20297            )
20298        }
20299        __tmp.put_u8(self.target_system);
20300        __tmp.put_u8(self.target_component);
20301        __tmp.put_u8(self.cmd_id as u8);
20302        for val in &self.value {
20303            __tmp.put_u8(*val);
20304        }
20305        if matches!(version, MavlinkVersion::V2) {
20306            let len = __tmp.len();
20307            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20308        } else {
20309            __tmp.len()
20310        }
20311    }
20312}
20313#[doc = "Response from a GOPRO_COMMAND set request."]
20314#[doc = ""]
20315#[doc = "ID: 219"]
20316#[derive(Debug, Clone, PartialEq)]
20317#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20319#[cfg_attr(feature = "ts", derive(TS))]
20320#[cfg_attr(feature = "ts", ts(export))]
20321pub struct GOPRO_SET_RESPONSE_DATA {
20322    #[doc = "Command ID."]
20323    pub cmd_id: GoproCommand,
20324    #[doc = "Status."]
20325    pub status: GoproRequestStatus,
20326}
20327impl GOPRO_SET_RESPONSE_DATA {
20328    pub const ENCODED_LEN: usize = 2usize;
20329    pub const DEFAULT: Self = Self {
20330        cmd_id: GoproCommand::DEFAULT,
20331        status: GoproRequestStatus::DEFAULT,
20332    };
20333    #[cfg(feature = "arbitrary")]
20334    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20335        use arbitrary::{Arbitrary, Unstructured};
20336        let mut buf = [0u8; 1024];
20337        rng.fill_bytes(&mut buf);
20338        let mut unstructured = Unstructured::new(&buf);
20339        Self::arbitrary(&mut unstructured).unwrap_or_default()
20340    }
20341}
20342impl Default for GOPRO_SET_RESPONSE_DATA {
20343    fn default() -> Self {
20344        Self::DEFAULT.clone()
20345    }
20346}
20347impl MessageData for GOPRO_SET_RESPONSE_DATA {
20348    type Message = MavMessage;
20349    const ID: u32 = 219u32;
20350    const NAME: &'static str = "GOPRO_SET_RESPONSE";
20351    const EXTRA_CRC: u8 = 162u8;
20352    const ENCODED_LEN: usize = 2usize;
20353    fn deser(
20354        _version: MavlinkVersion,
20355        __input: &[u8],
20356    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20357        let avail_len = __input.len();
20358        let mut payload_buf = [0; Self::ENCODED_LEN];
20359        let mut buf = if avail_len < Self::ENCODED_LEN {
20360            payload_buf[0..avail_len].copy_from_slice(__input);
20361            Bytes::new(&payload_buf)
20362        } else {
20363            Bytes::new(__input)
20364        };
20365        let mut __struct = Self::default();
20366        let tmp = buf.get_u8()?;
20367        __struct.cmd_id =
20368            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20369                enum_type: "GoproCommand",
20370                value: tmp as u64,
20371            })?;
20372        let tmp = buf.get_u8()?;
20373        __struct.status =
20374            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20375                enum_type: "GoproRequestStatus",
20376                value: tmp as u64,
20377            })?;
20378        Ok(__struct)
20379    }
20380    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20381        let mut __tmp = BytesMut::new(bytes);
20382        #[allow(clippy::absurd_extreme_comparisons)]
20383        #[allow(unused_comparisons)]
20384        if __tmp.remaining() < Self::ENCODED_LEN {
20385            panic!(
20386                "buffer is too small (need {} bytes, but got {})",
20387                Self::ENCODED_LEN,
20388                __tmp.remaining(),
20389            )
20390        }
20391        __tmp.put_u8(self.cmd_id as u8);
20392        __tmp.put_u8(self.status as u8);
20393        if matches!(version, MavlinkVersion::V2) {
20394            let len = __tmp.len();
20395            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20396        } else {
20397            __tmp.len()
20398        }
20399    }
20400}
20401#[doc = "Second GPS data."]
20402#[doc = ""]
20403#[doc = "ID: 124"]
20404#[derive(Debug, Clone, PartialEq)]
20405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20407#[cfg_attr(feature = "ts", derive(TS))]
20408#[cfg_attr(feature = "ts", ts(export))]
20409pub struct GPS2_RAW_DATA {
20410    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20411    pub time_usec: u64,
20412    #[doc = "Latitude (WGS84)"]
20413    pub lat: i32,
20414    #[doc = "Longitude (WGS84)"]
20415    pub lon: i32,
20416    #[doc = "Altitude (MSL). Positive for up."]
20417    pub alt: i32,
20418    #[doc = "Age of DGPS info"]
20419    pub dgps_age: u32,
20420    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
20421    pub eph: u16,
20422    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
20423    pub epv: u16,
20424    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
20425    pub vel: u16,
20426    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
20427    pub cog: u16,
20428    #[doc = "GPS fix type."]
20429    pub fix_type: GpsFixType,
20430    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
20431    pub satellites_visible: u8,
20432    #[doc = "Number of DGPS satellites"]
20433    pub dgps_numch: u8,
20434    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
20435    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20436    pub yaw: u16,
20437    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
20438    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20439    pub alt_ellipsoid: i32,
20440    #[doc = "Position uncertainty."]
20441    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20442    pub h_acc: u32,
20443    #[doc = "Altitude uncertainty."]
20444    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20445    pub v_acc: u32,
20446    #[doc = "Speed uncertainty."]
20447    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20448    pub vel_acc: u32,
20449    #[doc = "Heading / track uncertainty"]
20450    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20451    pub hdg_acc: u32,
20452}
20453impl GPS2_RAW_DATA {
20454    pub const ENCODED_LEN: usize = 57usize;
20455    pub const DEFAULT: Self = Self {
20456        time_usec: 0_u64,
20457        lat: 0_i32,
20458        lon: 0_i32,
20459        alt: 0_i32,
20460        dgps_age: 0_u32,
20461        eph: 0_u16,
20462        epv: 0_u16,
20463        vel: 0_u16,
20464        cog: 0_u16,
20465        fix_type: GpsFixType::DEFAULT,
20466        satellites_visible: 0_u8,
20467        dgps_numch: 0_u8,
20468        yaw: 0_u16,
20469        alt_ellipsoid: 0_i32,
20470        h_acc: 0_u32,
20471        v_acc: 0_u32,
20472        vel_acc: 0_u32,
20473        hdg_acc: 0_u32,
20474    };
20475    #[cfg(feature = "arbitrary")]
20476    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20477        use arbitrary::{Arbitrary, Unstructured};
20478        let mut buf = [0u8; 1024];
20479        rng.fill_bytes(&mut buf);
20480        let mut unstructured = Unstructured::new(&buf);
20481        Self::arbitrary(&mut unstructured).unwrap_or_default()
20482    }
20483}
20484impl Default for GPS2_RAW_DATA {
20485    fn default() -> Self {
20486        Self::DEFAULT.clone()
20487    }
20488}
20489impl MessageData for GPS2_RAW_DATA {
20490    type Message = MavMessage;
20491    const ID: u32 = 124u32;
20492    const NAME: &'static str = "GPS2_RAW";
20493    const EXTRA_CRC: u8 = 87u8;
20494    const ENCODED_LEN: usize = 57usize;
20495    fn deser(
20496        _version: MavlinkVersion,
20497        __input: &[u8],
20498    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20499        let avail_len = __input.len();
20500        let mut payload_buf = [0; Self::ENCODED_LEN];
20501        let mut buf = if avail_len < Self::ENCODED_LEN {
20502            payload_buf[0..avail_len].copy_from_slice(__input);
20503            Bytes::new(&payload_buf)
20504        } else {
20505            Bytes::new(__input)
20506        };
20507        let mut __struct = Self::default();
20508        __struct.time_usec = buf.get_u64_le()?;
20509        __struct.lat = buf.get_i32_le()?;
20510        __struct.lon = buf.get_i32_le()?;
20511        __struct.alt = buf.get_i32_le()?;
20512        __struct.dgps_age = buf.get_u32_le()?;
20513        __struct.eph = buf.get_u16_le()?;
20514        __struct.epv = buf.get_u16_le()?;
20515        __struct.vel = buf.get_u16_le()?;
20516        __struct.cog = buf.get_u16_le()?;
20517        let tmp = buf.get_u8()?;
20518        __struct.fix_type =
20519            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20520                enum_type: "GpsFixType",
20521                value: tmp as u64,
20522            })?;
20523        __struct.satellites_visible = buf.get_u8()?;
20524        __struct.dgps_numch = buf.get_u8()?;
20525        __struct.yaw = buf.get_u16_le()?;
20526        __struct.alt_ellipsoid = buf.get_i32_le()?;
20527        __struct.h_acc = buf.get_u32_le()?;
20528        __struct.v_acc = buf.get_u32_le()?;
20529        __struct.vel_acc = buf.get_u32_le()?;
20530        __struct.hdg_acc = buf.get_u32_le()?;
20531        Ok(__struct)
20532    }
20533    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20534        let mut __tmp = BytesMut::new(bytes);
20535        #[allow(clippy::absurd_extreme_comparisons)]
20536        #[allow(unused_comparisons)]
20537        if __tmp.remaining() < Self::ENCODED_LEN {
20538            panic!(
20539                "buffer is too small (need {} bytes, but got {})",
20540                Self::ENCODED_LEN,
20541                __tmp.remaining(),
20542            )
20543        }
20544        __tmp.put_u64_le(self.time_usec);
20545        __tmp.put_i32_le(self.lat);
20546        __tmp.put_i32_le(self.lon);
20547        __tmp.put_i32_le(self.alt);
20548        __tmp.put_u32_le(self.dgps_age);
20549        __tmp.put_u16_le(self.eph);
20550        __tmp.put_u16_le(self.epv);
20551        __tmp.put_u16_le(self.vel);
20552        __tmp.put_u16_le(self.cog);
20553        __tmp.put_u8(self.fix_type as u8);
20554        __tmp.put_u8(self.satellites_visible);
20555        __tmp.put_u8(self.dgps_numch);
20556        if matches!(version, MavlinkVersion::V2) {
20557            __tmp.put_u16_le(self.yaw);
20558            __tmp.put_i32_le(self.alt_ellipsoid);
20559            __tmp.put_u32_le(self.h_acc);
20560            __tmp.put_u32_le(self.v_acc);
20561            __tmp.put_u32_le(self.vel_acc);
20562            __tmp.put_u32_le(self.hdg_acc);
20563            let len = __tmp.len();
20564            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20565        } else {
20566            __tmp.len()
20567        }
20568    }
20569}
20570#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
20571#[doc = ""]
20572#[doc = "ID: 128"]
20573#[derive(Debug, Clone, PartialEq)]
20574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20576#[cfg_attr(feature = "ts", derive(TS))]
20577#[cfg_attr(feature = "ts", ts(export))]
20578pub struct GPS2_RTK_DATA {
20579    #[doc = "Time since boot of last baseline message received."]
20580    pub time_last_baseline_ms: u32,
20581    #[doc = "GPS Time of Week of last baseline"]
20582    pub tow: u32,
20583    #[doc = "Current baseline in ECEF x or NED north component."]
20584    pub baseline_a_mm: i32,
20585    #[doc = "Current baseline in ECEF y or NED east component."]
20586    pub baseline_b_mm: i32,
20587    #[doc = "Current baseline in ECEF z or NED down component."]
20588    pub baseline_c_mm: i32,
20589    #[doc = "Current estimate of baseline accuracy."]
20590    pub accuracy: u32,
20591    #[doc = "Current number of integer ambiguity hypotheses."]
20592    pub iar_num_hypotheses: i32,
20593    #[doc = "GPS Week Number of last baseline"]
20594    pub wn: u16,
20595    #[doc = "Identification of connected RTK receiver."]
20596    pub rtk_receiver_id: u8,
20597    #[doc = "GPS-specific health report for RTK data."]
20598    pub rtk_health: u8,
20599    #[doc = "Rate of baseline messages being received by GPS"]
20600    pub rtk_rate: u8,
20601    #[doc = "Current number of sats used for RTK calculation."]
20602    pub nsats: u8,
20603    #[doc = "Coordinate system of baseline"]
20604    pub baseline_coords_type: RtkBaselineCoordinateSystem,
20605}
20606impl GPS2_RTK_DATA {
20607    pub const ENCODED_LEN: usize = 35usize;
20608    pub const DEFAULT: Self = Self {
20609        time_last_baseline_ms: 0_u32,
20610        tow: 0_u32,
20611        baseline_a_mm: 0_i32,
20612        baseline_b_mm: 0_i32,
20613        baseline_c_mm: 0_i32,
20614        accuracy: 0_u32,
20615        iar_num_hypotheses: 0_i32,
20616        wn: 0_u16,
20617        rtk_receiver_id: 0_u8,
20618        rtk_health: 0_u8,
20619        rtk_rate: 0_u8,
20620        nsats: 0_u8,
20621        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
20622    };
20623    #[cfg(feature = "arbitrary")]
20624    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20625        use arbitrary::{Arbitrary, Unstructured};
20626        let mut buf = [0u8; 1024];
20627        rng.fill_bytes(&mut buf);
20628        let mut unstructured = Unstructured::new(&buf);
20629        Self::arbitrary(&mut unstructured).unwrap_or_default()
20630    }
20631}
20632impl Default for GPS2_RTK_DATA {
20633    fn default() -> Self {
20634        Self::DEFAULT.clone()
20635    }
20636}
20637impl MessageData for GPS2_RTK_DATA {
20638    type Message = MavMessage;
20639    const ID: u32 = 128u32;
20640    const NAME: &'static str = "GPS2_RTK";
20641    const EXTRA_CRC: u8 = 226u8;
20642    const ENCODED_LEN: usize = 35usize;
20643    fn deser(
20644        _version: MavlinkVersion,
20645        __input: &[u8],
20646    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20647        let avail_len = __input.len();
20648        let mut payload_buf = [0; Self::ENCODED_LEN];
20649        let mut buf = if avail_len < Self::ENCODED_LEN {
20650            payload_buf[0..avail_len].copy_from_slice(__input);
20651            Bytes::new(&payload_buf)
20652        } else {
20653            Bytes::new(__input)
20654        };
20655        let mut __struct = Self::default();
20656        __struct.time_last_baseline_ms = buf.get_u32_le()?;
20657        __struct.tow = buf.get_u32_le()?;
20658        __struct.baseline_a_mm = buf.get_i32_le()?;
20659        __struct.baseline_b_mm = buf.get_i32_le()?;
20660        __struct.baseline_c_mm = buf.get_i32_le()?;
20661        __struct.accuracy = buf.get_u32_le()?;
20662        __struct.iar_num_hypotheses = buf.get_i32_le()?;
20663        __struct.wn = buf.get_u16_le()?;
20664        __struct.rtk_receiver_id = buf.get_u8()?;
20665        __struct.rtk_health = buf.get_u8()?;
20666        __struct.rtk_rate = buf.get_u8()?;
20667        __struct.nsats = buf.get_u8()?;
20668        let tmp = buf.get_u8()?;
20669        __struct.baseline_coords_type =
20670            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20671                enum_type: "RtkBaselineCoordinateSystem",
20672                value: tmp as u64,
20673            })?;
20674        Ok(__struct)
20675    }
20676    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20677        let mut __tmp = BytesMut::new(bytes);
20678        #[allow(clippy::absurd_extreme_comparisons)]
20679        #[allow(unused_comparisons)]
20680        if __tmp.remaining() < Self::ENCODED_LEN {
20681            panic!(
20682                "buffer is too small (need {} bytes, but got {})",
20683                Self::ENCODED_LEN,
20684                __tmp.remaining(),
20685            )
20686        }
20687        __tmp.put_u32_le(self.time_last_baseline_ms);
20688        __tmp.put_u32_le(self.tow);
20689        __tmp.put_i32_le(self.baseline_a_mm);
20690        __tmp.put_i32_le(self.baseline_b_mm);
20691        __tmp.put_i32_le(self.baseline_c_mm);
20692        __tmp.put_u32_le(self.accuracy);
20693        __tmp.put_i32_le(self.iar_num_hypotheses);
20694        __tmp.put_u16_le(self.wn);
20695        __tmp.put_u8(self.rtk_receiver_id);
20696        __tmp.put_u8(self.rtk_health);
20697        __tmp.put_u8(self.rtk_rate);
20698        __tmp.put_u8(self.nsats);
20699        __tmp.put_u8(self.baseline_coords_type as u8);
20700        if matches!(version, MavlinkVersion::V2) {
20701            let len = __tmp.len();
20702            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20703        } else {
20704            __tmp.len()
20705        }
20706    }
20707}
20708#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
20709#[doc = ""]
20710#[doc = "ID: 49"]
20711#[derive(Debug, Clone, PartialEq)]
20712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20714#[cfg_attr(feature = "ts", derive(TS))]
20715#[cfg_attr(feature = "ts", ts(export))]
20716pub struct GPS_GLOBAL_ORIGIN_DATA {
20717    #[doc = "Latitude (WGS84)"]
20718    pub latitude: i32,
20719    #[doc = "Longitude (WGS84)"]
20720    pub longitude: i32,
20721    #[doc = "Altitude (MSL). Positive for up."]
20722    pub altitude: i32,
20723    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20724    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20725    pub time_usec: u64,
20726}
20727impl GPS_GLOBAL_ORIGIN_DATA {
20728    pub const ENCODED_LEN: usize = 20usize;
20729    pub const DEFAULT: Self = Self {
20730        latitude: 0_i32,
20731        longitude: 0_i32,
20732        altitude: 0_i32,
20733        time_usec: 0_u64,
20734    };
20735    #[cfg(feature = "arbitrary")]
20736    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20737        use arbitrary::{Arbitrary, Unstructured};
20738        let mut buf = [0u8; 1024];
20739        rng.fill_bytes(&mut buf);
20740        let mut unstructured = Unstructured::new(&buf);
20741        Self::arbitrary(&mut unstructured).unwrap_or_default()
20742    }
20743}
20744impl Default for GPS_GLOBAL_ORIGIN_DATA {
20745    fn default() -> Self {
20746        Self::DEFAULT.clone()
20747    }
20748}
20749impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
20750    type Message = MavMessage;
20751    const ID: u32 = 49u32;
20752    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
20753    const EXTRA_CRC: u8 = 39u8;
20754    const ENCODED_LEN: usize = 20usize;
20755    fn deser(
20756        _version: MavlinkVersion,
20757        __input: &[u8],
20758    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20759        let avail_len = __input.len();
20760        let mut payload_buf = [0; Self::ENCODED_LEN];
20761        let mut buf = if avail_len < Self::ENCODED_LEN {
20762            payload_buf[0..avail_len].copy_from_slice(__input);
20763            Bytes::new(&payload_buf)
20764        } else {
20765            Bytes::new(__input)
20766        };
20767        let mut __struct = Self::default();
20768        __struct.latitude = buf.get_i32_le()?;
20769        __struct.longitude = buf.get_i32_le()?;
20770        __struct.altitude = buf.get_i32_le()?;
20771        __struct.time_usec = buf.get_u64_le()?;
20772        Ok(__struct)
20773    }
20774    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20775        let mut __tmp = BytesMut::new(bytes);
20776        #[allow(clippy::absurd_extreme_comparisons)]
20777        #[allow(unused_comparisons)]
20778        if __tmp.remaining() < Self::ENCODED_LEN {
20779            panic!(
20780                "buffer is too small (need {} bytes, but got {})",
20781                Self::ENCODED_LEN,
20782                __tmp.remaining(),
20783            )
20784        }
20785        __tmp.put_i32_le(self.latitude);
20786        __tmp.put_i32_le(self.longitude);
20787        __tmp.put_i32_le(self.altitude);
20788        if matches!(version, MavlinkVersion::V2) {
20789            __tmp.put_u64_le(self.time_usec);
20790            let len = __tmp.len();
20791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20792        } else {
20793            __tmp.len()
20794        }
20795    }
20796}
20797#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
20798#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
20799#[doc = ""]
20800#[doc = "ID: 123"]
20801#[derive(Debug, Clone, PartialEq)]
20802#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20803#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20804#[cfg_attr(feature = "ts", derive(TS))]
20805#[cfg_attr(feature = "ts", ts(export))]
20806pub struct GPS_INJECT_DATA_DATA {
20807    #[doc = "System ID"]
20808    pub target_system: u8,
20809    #[doc = "Component ID"]
20810    pub target_component: u8,
20811    #[doc = "Data length"]
20812    pub len: u8,
20813    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
20814    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20815    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20816    pub data: [u8; 110],
20817}
20818impl GPS_INJECT_DATA_DATA {
20819    pub const ENCODED_LEN: usize = 113usize;
20820    pub const DEFAULT: Self = Self {
20821        target_system: 0_u8,
20822        target_component: 0_u8,
20823        len: 0_u8,
20824        data: [0_u8; 110usize],
20825    };
20826    #[cfg(feature = "arbitrary")]
20827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20828        use arbitrary::{Arbitrary, Unstructured};
20829        let mut buf = [0u8; 1024];
20830        rng.fill_bytes(&mut buf);
20831        let mut unstructured = Unstructured::new(&buf);
20832        Self::arbitrary(&mut unstructured).unwrap_or_default()
20833    }
20834}
20835impl Default for GPS_INJECT_DATA_DATA {
20836    fn default() -> Self {
20837        Self::DEFAULT.clone()
20838    }
20839}
20840impl MessageData for GPS_INJECT_DATA_DATA {
20841    type Message = MavMessage;
20842    const ID: u32 = 123u32;
20843    const NAME: &'static str = "GPS_INJECT_DATA";
20844    const EXTRA_CRC: u8 = 250u8;
20845    const ENCODED_LEN: usize = 113usize;
20846    fn deser(
20847        _version: MavlinkVersion,
20848        __input: &[u8],
20849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20850        let avail_len = __input.len();
20851        let mut payload_buf = [0; Self::ENCODED_LEN];
20852        let mut buf = if avail_len < Self::ENCODED_LEN {
20853            payload_buf[0..avail_len].copy_from_slice(__input);
20854            Bytes::new(&payload_buf)
20855        } else {
20856            Bytes::new(__input)
20857        };
20858        let mut __struct = Self::default();
20859        __struct.target_system = buf.get_u8()?;
20860        __struct.target_component = buf.get_u8()?;
20861        __struct.len = buf.get_u8()?;
20862        for v in &mut __struct.data {
20863            let val = buf.get_u8()?;
20864            *v = val;
20865        }
20866        Ok(__struct)
20867    }
20868    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20869        let mut __tmp = BytesMut::new(bytes);
20870        #[allow(clippy::absurd_extreme_comparisons)]
20871        #[allow(unused_comparisons)]
20872        if __tmp.remaining() < Self::ENCODED_LEN {
20873            panic!(
20874                "buffer is too small (need {} bytes, but got {})",
20875                Self::ENCODED_LEN,
20876                __tmp.remaining(),
20877            )
20878        }
20879        __tmp.put_u8(self.target_system);
20880        __tmp.put_u8(self.target_component);
20881        __tmp.put_u8(self.len);
20882        for val in &self.data {
20883            __tmp.put_u8(*val);
20884        }
20885        if matches!(version, MavlinkVersion::V2) {
20886            let len = __tmp.len();
20887            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20888        } else {
20889            __tmp.len()
20890        }
20891    }
20892}
20893#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
20894#[doc = ""]
20895#[doc = "ID: 232"]
20896#[derive(Debug, Clone, PartialEq)]
20897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20899#[cfg_attr(feature = "ts", derive(TS))]
20900#[cfg_attr(feature = "ts", ts(export))]
20901pub struct GPS_INPUT_DATA {
20902    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20903    pub time_usec: u64,
20904    #[doc = "GPS time (from start of GPS week)"]
20905    pub time_week_ms: u32,
20906    #[doc = "Latitude (WGS84)"]
20907    pub lat: i32,
20908    #[doc = "Longitude (WGS84)"]
20909    pub lon: i32,
20910    #[doc = "Altitude (MSL). Positive for up."]
20911    pub alt: f32,
20912    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
20913    pub hdop: f32,
20914    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
20915    pub vdop: f32,
20916    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
20917    pub vn: f32,
20918    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
20919    pub ve: f32,
20920    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
20921    pub vd: f32,
20922    #[doc = "GPS speed accuracy"]
20923    pub speed_accuracy: f32,
20924    #[doc = "GPS horizontal accuracy"]
20925    pub horiz_accuracy: f32,
20926    #[doc = "GPS vertical accuracy"]
20927    pub vert_accuracy: f32,
20928    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
20929    pub ignore_flags: GpsInputIgnoreFlags,
20930    #[doc = "GPS week number"]
20931    pub time_week: u16,
20932    #[doc = "ID of the GPS for multiple GPS inputs"]
20933    pub gps_id: u8,
20934    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
20935    pub fix_type: u8,
20936    #[doc = "Number of satellites visible."]
20937    pub satellites_visible: u8,
20938    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
20939    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20940    pub yaw: u16,
20941}
20942impl GPS_INPUT_DATA {
20943    pub const ENCODED_LEN: usize = 65usize;
20944    pub const DEFAULT: Self = Self {
20945        time_usec: 0_u64,
20946        time_week_ms: 0_u32,
20947        lat: 0_i32,
20948        lon: 0_i32,
20949        alt: 0.0_f32,
20950        hdop: 0.0_f32,
20951        vdop: 0.0_f32,
20952        vn: 0.0_f32,
20953        ve: 0.0_f32,
20954        vd: 0.0_f32,
20955        speed_accuracy: 0.0_f32,
20956        horiz_accuracy: 0.0_f32,
20957        vert_accuracy: 0.0_f32,
20958        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
20959        time_week: 0_u16,
20960        gps_id: 0_u8,
20961        fix_type: 0_u8,
20962        satellites_visible: 0_u8,
20963        yaw: 0_u16,
20964    };
20965    #[cfg(feature = "arbitrary")]
20966    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20967        use arbitrary::{Arbitrary, Unstructured};
20968        let mut buf = [0u8; 1024];
20969        rng.fill_bytes(&mut buf);
20970        let mut unstructured = Unstructured::new(&buf);
20971        Self::arbitrary(&mut unstructured).unwrap_or_default()
20972    }
20973}
20974impl Default for GPS_INPUT_DATA {
20975    fn default() -> Self {
20976        Self::DEFAULT.clone()
20977    }
20978}
20979impl MessageData for GPS_INPUT_DATA {
20980    type Message = MavMessage;
20981    const ID: u32 = 232u32;
20982    const NAME: &'static str = "GPS_INPUT";
20983    const EXTRA_CRC: u8 = 151u8;
20984    const ENCODED_LEN: usize = 65usize;
20985    fn deser(
20986        _version: MavlinkVersion,
20987        __input: &[u8],
20988    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20989        let avail_len = __input.len();
20990        let mut payload_buf = [0; Self::ENCODED_LEN];
20991        let mut buf = if avail_len < Self::ENCODED_LEN {
20992            payload_buf[0..avail_len].copy_from_slice(__input);
20993            Bytes::new(&payload_buf)
20994        } else {
20995            Bytes::new(__input)
20996        };
20997        let mut __struct = Self::default();
20998        __struct.time_usec = buf.get_u64_le()?;
20999        __struct.time_week_ms = buf.get_u32_le()?;
21000        __struct.lat = buf.get_i32_le()?;
21001        __struct.lon = buf.get_i32_le()?;
21002        __struct.alt = buf.get_f32_le()?;
21003        __struct.hdop = buf.get_f32_le()?;
21004        __struct.vdop = buf.get_f32_le()?;
21005        __struct.vn = buf.get_f32_le()?;
21006        __struct.ve = buf.get_f32_le()?;
21007        __struct.vd = buf.get_f32_le()?;
21008        __struct.speed_accuracy = buf.get_f32_le()?;
21009        __struct.horiz_accuracy = buf.get_f32_le()?;
21010        __struct.vert_accuracy = buf.get_f32_le()?;
21011        let tmp = buf.get_u16_le()?;
21012        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
21013            tmp as <GpsInputIgnoreFlags as Flags>::Bits,
21014        )
21015        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
21016            flag_type: "GpsInputIgnoreFlags",
21017            value: tmp as u64,
21018        })?;
21019        __struct.time_week = buf.get_u16_le()?;
21020        __struct.gps_id = buf.get_u8()?;
21021        __struct.fix_type = buf.get_u8()?;
21022        __struct.satellites_visible = buf.get_u8()?;
21023        __struct.yaw = buf.get_u16_le()?;
21024        Ok(__struct)
21025    }
21026    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21027        let mut __tmp = BytesMut::new(bytes);
21028        #[allow(clippy::absurd_extreme_comparisons)]
21029        #[allow(unused_comparisons)]
21030        if __tmp.remaining() < Self::ENCODED_LEN {
21031            panic!(
21032                "buffer is too small (need {} bytes, but got {})",
21033                Self::ENCODED_LEN,
21034                __tmp.remaining(),
21035            )
21036        }
21037        __tmp.put_u64_le(self.time_usec);
21038        __tmp.put_u32_le(self.time_week_ms);
21039        __tmp.put_i32_le(self.lat);
21040        __tmp.put_i32_le(self.lon);
21041        __tmp.put_f32_le(self.alt);
21042        __tmp.put_f32_le(self.hdop);
21043        __tmp.put_f32_le(self.vdop);
21044        __tmp.put_f32_le(self.vn);
21045        __tmp.put_f32_le(self.ve);
21046        __tmp.put_f32_le(self.vd);
21047        __tmp.put_f32_le(self.speed_accuracy);
21048        __tmp.put_f32_le(self.horiz_accuracy);
21049        __tmp.put_f32_le(self.vert_accuracy);
21050        __tmp.put_u16_le(self.ignore_flags.bits() as u16);
21051        __tmp.put_u16_le(self.time_week);
21052        __tmp.put_u8(self.gps_id);
21053        __tmp.put_u8(self.fix_type);
21054        __tmp.put_u8(self.satellites_visible);
21055        if matches!(version, MavlinkVersion::V2) {
21056            __tmp.put_u16_le(self.yaw);
21057            let len = __tmp.len();
21058            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21059        } else {
21060            __tmp.len()
21061        }
21062    }
21063}
21064#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
21065#[doc = ""]
21066#[doc = "ID: 24"]
21067#[derive(Debug, Clone, PartialEq)]
21068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21070#[cfg_attr(feature = "ts", derive(TS))]
21071#[cfg_attr(feature = "ts", ts(export))]
21072pub struct GPS_RAW_INT_DATA {
21073    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21074    pub time_usec: u64,
21075    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
21076    pub lat: i32,
21077    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
21078    pub lon: i32,
21079    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
21080    pub alt: i32,
21081    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
21082    pub eph: u16,
21083    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
21084    pub epv: u16,
21085    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
21086    pub vel: u16,
21087    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
21088    pub cog: u16,
21089    #[doc = "GPS fix type."]
21090    pub fix_type: GpsFixType,
21091    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
21092    pub satellites_visible: u8,
21093    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
21094    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21095    pub alt_ellipsoid: i32,
21096    #[doc = "Position uncertainty."]
21097    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21098    pub h_acc: u32,
21099    #[doc = "Altitude uncertainty."]
21100    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21101    pub v_acc: u32,
21102    #[doc = "Speed uncertainty."]
21103    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21104    pub vel_acc: u32,
21105    #[doc = "Heading / track uncertainty"]
21106    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21107    pub hdg_acc: u32,
21108    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
21109    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21110    pub yaw: u16,
21111}
21112impl GPS_RAW_INT_DATA {
21113    pub const ENCODED_LEN: usize = 52usize;
21114    pub const DEFAULT: Self = Self {
21115        time_usec: 0_u64,
21116        lat: 0_i32,
21117        lon: 0_i32,
21118        alt: 0_i32,
21119        eph: 0_u16,
21120        epv: 0_u16,
21121        vel: 0_u16,
21122        cog: 0_u16,
21123        fix_type: GpsFixType::DEFAULT,
21124        satellites_visible: 0_u8,
21125        alt_ellipsoid: 0_i32,
21126        h_acc: 0_u32,
21127        v_acc: 0_u32,
21128        vel_acc: 0_u32,
21129        hdg_acc: 0_u32,
21130        yaw: 0_u16,
21131    };
21132    #[cfg(feature = "arbitrary")]
21133    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21134        use arbitrary::{Arbitrary, Unstructured};
21135        let mut buf = [0u8; 1024];
21136        rng.fill_bytes(&mut buf);
21137        let mut unstructured = Unstructured::new(&buf);
21138        Self::arbitrary(&mut unstructured).unwrap_or_default()
21139    }
21140}
21141impl Default for GPS_RAW_INT_DATA {
21142    fn default() -> Self {
21143        Self::DEFAULT.clone()
21144    }
21145}
21146impl MessageData for GPS_RAW_INT_DATA {
21147    type Message = MavMessage;
21148    const ID: u32 = 24u32;
21149    const NAME: &'static str = "GPS_RAW_INT";
21150    const EXTRA_CRC: u8 = 24u8;
21151    const ENCODED_LEN: usize = 52usize;
21152    fn deser(
21153        _version: MavlinkVersion,
21154        __input: &[u8],
21155    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21156        let avail_len = __input.len();
21157        let mut payload_buf = [0; Self::ENCODED_LEN];
21158        let mut buf = if avail_len < Self::ENCODED_LEN {
21159            payload_buf[0..avail_len].copy_from_slice(__input);
21160            Bytes::new(&payload_buf)
21161        } else {
21162            Bytes::new(__input)
21163        };
21164        let mut __struct = Self::default();
21165        __struct.time_usec = buf.get_u64_le()?;
21166        __struct.lat = buf.get_i32_le()?;
21167        __struct.lon = buf.get_i32_le()?;
21168        __struct.alt = buf.get_i32_le()?;
21169        __struct.eph = buf.get_u16_le()?;
21170        __struct.epv = buf.get_u16_le()?;
21171        __struct.vel = buf.get_u16_le()?;
21172        __struct.cog = buf.get_u16_le()?;
21173        let tmp = buf.get_u8()?;
21174        __struct.fix_type =
21175            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21176                enum_type: "GpsFixType",
21177                value: tmp as u64,
21178            })?;
21179        __struct.satellites_visible = buf.get_u8()?;
21180        __struct.alt_ellipsoid = buf.get_i32_le()?;
21181        __struct.h_acc = buf.get_u32_le()?;
21182        __struct.v_acc = buf.get_u32_le()?;
21183        __struct.vel_acc = buf.get_u32_le()?;
21184        __struct.hdg_acc = buf.get_u32_le()?;
21185        __struct.yaw = buf.get_u16_le()?;
21186        Ok(__struct)
21187    }
21188    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21189        let mut __tmp = BytesMut::new(bytes);
21190        #[allow(clippy::absurd_extreme_comparisons)]
21191        #[allow(unused_comparisons)]
21192        if __tmp.remaining() < Self::ENCODED_LEN {
21193            panic!(
21194                "buffer is too small (need {} bytes, but got {})",
21195                Self::ENCODED_LEN,
21196                __tmp.remaining(),
21197            )
21198        }
21199        __tmp.put_u64_le(self.time_usec);
21200        __tmp.put_i32_le(self.lat);
21201        __tmp.put_i32_le(self.lon);
21202        __tmp.put_i32_le(self.alt);
21203        __tmp.put_u16_le(self.eph);
21204        __tmp.put_u16_le(self.epv);
21205        __tmp.put_u16_le(self.vel);
21206        __tmp.put_u16_le(self.cog);
21207        __tmp.put_u8(self.fix_type as u8);
21208        __tmp.put_u8(self.satellites_visible);
21209        if matches!(version, MavlinkVersion::V2) {
21210            __tmp.put_i32_le(self.alt_ellipsoid);
21211            __tmp.put_u32_le(self.h_acc);
21212            __tmp.put_u32_le(self.v_acc);
21213            __tmp.put_u32_le(self.vel_acc);
21214            __tmp.put_u32_le(self.hdg_acc);
21215            __tmp.put_u16_le(self.yaw);
21216            let len = __tmp.len();
21217            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21218        } else {
21219            __tmp.len()
21220        }
21221    }
21222}
21223#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
21224#[doc = ""]
21225#[doc = "ID: 233"]
21226#[derive(Debug, Clone, PartialEq)]
21227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21229#[cfg_attr(feature = "ts", derive(TS))]
21230#[cfg_attr(feature = "ts", ts(export))]
21231pub struct GPS_RTCM_DATA_DATA {
21232    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
21233    pub flags: u8,
21234    #[doc = "data length"]
21235    pub len: u8,
21236    #[doc = "RTCM message (may be fragmented)"]
21237    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21238    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21239    pub data: [u8; 180],
21240}
21241impl GPS_RTCM_DATA_DATA {
21242    pub const ENCODED_LEN: usize = 182usize;
21243    pub const DEFAULT: Self = Self {
21244        flags: 0_u8,
21245        len: 0_u8,
21246        data: [0_u8; 180usize],
21247    };
21248    #[cfg(feature = "arbitrary")]
21249    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21250        use arbitrary::{Arbitrary, Unstructured};
21251        let mut buf = [0u8; 1024];
21252        rng.fill_bytes(&mut buf);
21253        let mut unstructured = Unstructured::new(&buf);
21254        Self::arbitrary(&mut unstructured).unwrap_or_default()
21255    }
21256}
21257impl Default for GPS_RTCM_DATA_DATA {
21258    fn default() -> Self {
21259        Self::DEFAULT.clone()
21260    }
21261}
21262impl MessageData for GPS_RTCM_DATA_DATA {
21263    type Message = MavMessage;
21264    const ID: u32 = 233u32;
21265    const NAME: &'static str = "GPS_RTCM_DATA";
21266    const EXTRA_CRC: u8 = 35u8;
21267    const ENCODED_LEN: usize = 182usize;
21268    fn deser(
21269        _version: MavlinkVersion,
21270        __input: &[u8],
21271    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21272        let avail_len = __input.len();
21273        let mut payload_buf = [0; Self::ENCODED_LEN];
21274        let mut buf = if avail_len < Self::ENCODED_LEN {
21275            payload_buf[0..avail_len].copy_from_slice(__input);
21276            Bytes::new(&payload_buf)
21277        } else {
21278            Bytes::new(__input)
21279        };
21280        let mut __struct = Self::default();
21281        __struct.flags = buf.get_u8()?;
21282        __struct.len = buf.get_u8()?;
21283        for v in &mut __struct.data {
21284            let val = buf.get_u8()?;
21285            *v = val;
21286        }
21287        Ok(__struct)
21288    }
21289    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21290        let mut __tmp = BytesMut::new(bytes);
21291        #[allow(clippy::absurd_extreme_comparisons)]
21292        #[allow(unused_comparisons)]
21293        if __tmp.remaining() < Self::ENCODED_LEN {
21294            panic!(
21295                "buffer is too small (need {} bytes, but got {})",
21296                Self::ENCODED_LEN,
21297                __tmp.remaining(),
21298            )
21299        }
21300        __tmp.put_u8(self.flags);
21301        __tmp.put_u8(self.len);
21302        for val in &self.data {
21303            __tmp.put_u8(*val);
21304        }
21305        if matches!(version, MavlinkVersion::V2) {
21306            let len = __tmp.len();
21307            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21308        } else {
21309            __tmp.len()
21310        }
21311    }
21312}
21313#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
21314#[doc = ""]
21315#[doc = "ID: 127"]
21316#[derive(Debug, Clone, PartialEq)]
21317#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21319#[cfg_attr(feature = "ts", derive(TS))]
21320#[cfg_attr(feature = "ts", ts(export))]
21321pub struct GPS_RTK_DATA {
21322    #[doc = "Time since boot of last baseline message received."]
21323    pub time_last_baseline_ms: u32,
21324    #[doc = "GPS Time of Week of last baseline"]
21325    pub tow: u32,
21326    #[doc = "Current baseline in ECEF x or NED north component."]
21327    pub baseline_a_mm: i32,
21328    #[doc = "Current baseline in ECEF y or NED east component."]
21329    pub baseline_b_mm: i32,
21330    #[doc = "Current baseline in ECEF z or NED down component."]
21331    pub baseline_c_mm: i32,
21332    #[doc = "Current estimate of baseline accuracy."]
21333    pub accuracy: u32,
21334    #[doc = "Current number of integer ambiguity hypotheses."]
21335    pub iar_num_hypotheses: i32,
21336    #[doc = "GPS Week Number of last baseline"]
21337    pub wn: u16,
21338    #[doc = "Identification of connected RTK receiver."]
21339    pub rtk_receiver_id: u8,
21340    #[doc = "GPS-specific health report for RTK data."]
21341    pub rtk_health: u8,
21342    #[doc = "Rate of baseline messages being received by GPS"]
21343    pub rtk_rate: u8,
21344    #[doc = "Current number of sats used for RTK calculation."]
21345    pub nsats: u8,
21346    #[doc = "Coordinate system of baseline"]
21347    pub baseline_coords_type: RtkBaselineCoordinateSystem,
21348}
21349impl GPS_RTK_DATA {
21350    pub const ENCODED_LEN: usize = 35usize;
21351    pub const DEFAULT: Self = Self {
21352        time_last_baseline_ms: 0_u32,
21353        tow: 0_u32,
21354        baseline_a_mm: 0_i32,
21355        baseline_b_mm: 0_i32,
21356        baseline_c_mm: 0_i32,
21357        accuracy: 0_u32,
21358        iar_num_hypotheses: 0_i32,
21359        wn: 0_u16,
21360        rtk_receiver_id: 0_u8,
21361        rtk_health: 0_u8,
21362        rtk_rate: 0_u8,
21363        nsats: 0_u8,
21364        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
21365    };
21366    #[cfg(feature = "arbitrary")]
21367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21368        use arbitrary::{Arbitrary, Unstructured};
21369        let mut buf = [0u8; 1024];
21370        rng.fill_bytes(&mut buf);
21371        let mut unstructured = Unstructured::new(&buf);
21372        Self::arbitrary(&mut unstructured).unwrap_or_default()
21373    }
21374}
21375impl Default for GPS_RTK_DATA {
21376    fn default() -> Self {
21377        Self::DEFAULT.clone()
21378    }
21379}
21380impl MessageData for GPS_RTK_DATA {
21381    type Message = MavMessage;
21382    const ID: u32 = 127u32;
21383    const NAME: &'static str = "GPS_RTK";
21384    const EXTRA_CRC: u8 = 25u8;
21385    const ENCODED_LEN: usize = 35usize;
21386    fn deser(
21387        _version: MavlinkVersion,
21388        __input: &[u8],
21389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21390        let avail_len = __input.len();
21391        let mut payload_buf = [0; Self::ENCODED_LEN];
21392        let mut buf = if avail_len < Self::ENCODED_LEN {
21393            payload_buf[0..avail_len].copy_from_slice(__input);
21394            Bytes::new(&payload_buf)
21395        } else {
21396            Bytes::new(__input)
21397        };
21398        let mut __struct = Self::default();
21399        __struct.time_last_baseline_ms = buf.get_u32_le()?;
21400        __struct.tow = buf.get_u32_le()?;
21401        __struct.baseline_a_mm = buf.get_i32_le()?;
21402        __struct.baseline_b_mm = buf.get_i32_le()?;
21403        __struct.baseline_c_mm = buf.get_i32_le()?;
21404        __struct.accuracy = buf.get_u32_le()?;
21405        __struct.iar_num_hypotheses = buf.get_i32_le()?;
21406        __struct.wn = buf.get_u16_le()?;
21407        __struct.rtk_receiver_id = buf.get_u8()?;
21408        __struct.rtk_health = buf.get_u8()?;
21409        __struct.rtk_rate = buf.get_u8()?;
21410        __struct.nsats = buf.get_u8()?;
21411        let tmp = buf.get_u8()?;
21412        __struct.baseline_coords_type =
21413            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21414                enum_type: "RtkBaselineCoordinateSystem",
21415                value: tmp as u64,
21416            })?;
21417        Ok(__struct)
21418    }
21419    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21420        let mut __tmp = BytesMut::new(bytes);
21421        #[allow(clippy::absurd_extreme_comparisons)]
21422        #[allow(unused_comparisons)]
21423        if __tmp.remaining() < Self::ENCODED_LEN {
21424            panic!(
21425                "buffer is too small (need {} bytes, but got {})",
21426                Self::ENCODED_LEN,
21427                __tmp.remaining(),
21428            )
21429        }
21430        __tmp.put_u32_le(self.time_last_baseline_ms);
21431        __tmp.put_u32_le(self.tow);
21432        __tmp.put_i32_le(self.baseline_a_mm);
21433        __tmp.put_i32_le(self.baseline_b_mm);
21434        __tmp.put_i32_le(self.baseline_c_mm);
21435        __tmp.put_u32_le(self.accuracy);
21436        __tmp.put_i32_le(self.iar_num_hypotheses);
21437        __tmp.put_u16_le(self.wn);
21438        __tmp.put_u8(self.rtk_receiver_id);
21439        __tmp.put_u8(self.rtk_health);
21440        __tmp.put_u8(self.rtk_rate);
21441        __tmp.put_u8(self.nsats);
21442        __tmp.put_u8(self.baseline_coords_type as u8);
21443        if matches!(version, MavlinkVersion::V2) {
21444            let len = __tmp.len();
21445            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21446        } else {
21447            __tmp.len()
21448        }
21449    }
21450}
21451#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
21452#[doc = ""]
21453#[doc = "ID: 25"]
21454#[derive(Debug, Clone, PartialEq)]
21455#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21456#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21457#[cfg_attr(feature = "ts", derive(TS))]
21458#[cfg_attr(feature = "ts", ts(export))]
21459pub struct GPS_STATUS_DATA {
21460    #[doc = "Number of satellites visible"]
21461    pub satellites_visible: u8,
21462    #[doc = "Global satellite ID"]
21463    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21464    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21465    pub satellite_prn: [u8; 20],
21466    #[doc = "0: Satellite not used, 1: used for localization"]
21467    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21468    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21469    pub satellite_used: [u8; 20],
21470    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
21471    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21472    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21473    pub satellite_elevation: [u8; 20],
21474    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
21475    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21476    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21477    pub satellite_azimuth: [u8; 20],
21478    #[doc = "Signal to noise ratio of satellite"]
21479    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21480    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21481    pub satellite_snr: [u8; 20],
21482}
21483impl GPS_STATUS_DATA {
21484    pub const ENCODED_LEN: usize = 101usize;
21485    pub const DEFAULT: Self = Self {
21486        satellites_visible: 0_u8,
21487        satellite_prn: [0_u8; 20usize],
21488        satellite_used: [0_u8; 20usize],
21489        satellite_elevation: [0_u8; 20usize],
21490        satellite_azimuth: [0_u8; 20usize],
21491        satellite_snr: [0_u8; 20usize],
21492    };
21493    #[cfg(feature = "arbitrary")]
21494    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21495        use arbitrary::{Arbitrary, Unstructured};
21496        let mut buf = [0u8; 1024];
21497        rng.fill_bytes(&mut buf);
21498        let mut unstructured = Unstructured::new(&buf);
21499        Self::arbitrary(&mut unstructured).unwrap_or_default()
21500    }
21501}
21502impl Default for GPS_STATUS_DATA {
21503    fn default() -> Self {
21504        Self::DEFAULT.clone()
21505    }
21506}
21507impl MessageData for GPS_STATUS_DATA {
21508    type Message = MavMessage;
21509    const ID: u32 = 25u32;
21510    const NAME: &'static str = "GPS_STATUS";
21511    const EXTRA_CRC: u8 = 23u8;
21512    const ENCODED_LEN: usize = 101usize;
21513    fn deser(
21514        _version: MavlinkVersion,
21515        __input: &[u8],
21516    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21517        let avail_len = __input.len();
21518        let mut payload_buf = [0; Self::ENCODED_LEN];
21519        let mut buf = if avail_len < Self::ENCODED_LEN {
21520            payload_buf[0..avail_len].copy_from_slice(__input);
21521            Bytes::new(&payload_buf)
21522        } else {
21523            Bytes::new(__input)
21524        };
21525        let mut __struct = Self::default();
21526        __struct.satellites_visible = buf.get_u8()?;
21527        for v in &mut __struct.satellite_prn {
21528            let val = buf.get_u8()?;
21529            *v = val;
21530        }
21531        for v in &mut __struct.satellite_used {
21532            let val = buf.get_u8()?;
21533            *v = val;
21534        }
21535        for v in &mut __struct.satellite_elevation {
21536            let val = buf.get_u8()?;
21537            *v = val;
21538        }
21539        for v in &mut __struct.satellite_azimuth {
21540            let val = buf.get_u8()?;
21541            *v = val;
21542        }
21543        for v in &mut __struct.satellite_snr {
21544            let val = buf.get_u8()?;
21545            *v = val;
21546        }
21547        Ok(__struct)
21548    }
21549    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21550        let mut __tmp = BytesMut::new(bytes);
21551        #[allow(clippy::absurd_extreme_comparisons)]
21552        #[allow(unused_comparisons)]
21553        if __tmp.remaining() < Self::ENCODED_LEN {
21554            panic!(
21555                "buffer is too small (need {} bytes, but got {})",
21556                Self::ENCODED_LEN,
21557                __tmp.remaining(),
21558            )
21559        }
21560        __tmp.put_u8(self.satellites_visible);
21561        for val in &self.satellite_prn {
21562            __tmp.put_u8(*val);
21563        }
21564        for val in &self.satellite_used {
21565            __tmp.put_u8(*val);
21566        }
21567        for val in &self.satellite_elevation {
21568            __tmp.put_u8(*val);
21569        }
21570        for val in &self.satellite_azimuth {
21571            __tmp.put_u8(*val);
21572        }
21573        for val in &self.satellite_snr {
21574            __tmp.put_u8(*val);
21575        }
21576        if matches!(version, MavlinkVersion::V2) {
21577            let len = __tmp.len();
21578            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21579        } else {
21580            __tmp.len()
21581        }
21582    }
21583}
21584#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
21585#[doc = ""]
21586#[doc = "ID: 0"]
21587#[derive(Debug, Clone, PartialEq)]
21588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21590#[cfg_attr(feature = "ts", derive(TS))]
21591#[cfg_attr(feature = "ts", ts(export))]
21592pub struct HEARTBEAT_DATA {
21593    #[doc = "A bitfield for use for autopilot-specific flags"]
21594    pub custom_mode: u32,
21595    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
21596    pub mavtype: MavType,
21597    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
21598    pub autopilot: MavAutopilot,
21599    #[doc = "System mode bitmap."]
21600    pub base_mode: MavModeFlag,
21601    #[doc = "System status flag."]
21602    pub system_status: MavState,
21603    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
21604    pub mavlink_version: u8,
21605}
21606impl HEARTBEAT_DATA {
21607    pub const ENCODED_LEN: usize = 9usize;
21608    pub const DEFAULT: Self = Self {
21609        custom_mode: 0_u32,
21610        mavtype: MavType::DEFAULT,
21611        autopilot: MavAutopilot::DEFAULT,
21612        base_mode: MavModeFlag::DEFAULT,
21613        system_status: MavState::DEFAULT,
21614        mavlink_version: MINOR_MAVLINK_VERSION,
21615    };
21616    #[cfg(feature = "arbitrary")]
21617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21618        use arbitrary::{Arbitrary, Unstructured};
21619        let mut buf = [0u8; 1024];
21620        rng.fill_bytes(&mut buf);
21621        let mut unstructured = Unstructured::new(&buf);
21622        Self::arbitrary(&mut unstructured).unwrap_or_default()
21623    }
21624}
21625impl Default for HEARTBEAT_DATA {
21626    fn default() -> Self {
21627        Self::DEFAULT.clone()
21628    }
21629}
21630impl MessageData for HEARTBEAT_DATA {
21631    type Message = MavMessage;
21632    const ID: u32 = 0u32;
21633    const NAME: &'static str = "HEARTBEAT";
21634    const EXTRA_CRC: u8 = 50u8;
21635    const ENCODED_LEN: usize = 9usize;
21636    fn deser(
21637        _version: MavlinkVersion,
21638        __input: &[u8],
21639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21640        let avail_len = __input.len();
21641        let mut payload_buf = [0; Self::ENCODED_LEN];
21642        let mut buf = if avail_len < Self::ENCODED_LEN {
21643            payload_buf[0..avail_len].copy_from_slice(__input);
21644            Bytes::new(&payload_buf)
21645        } else {
21646            Bytes::new(__input)
21647        };
21648        let mut __struct = Self::default();
21649        __struct.custom_mode = buf.get_u32_le()?;
21650        let tmp = buf.get_u8()?;
21651        __struct.mavtype =
21652            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21653                enum_type: "MavType",
21654                value: tmp as u64,
21655            })?;
21656        let tmp = buf.get_u8()?;
21657        __struct.autopilot =
21658            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21659                enum_type: "MavAutopilot",
21660                value: tmp as u64,
21661            })?;
21662        let tmp = buf.get_u8()?;
21663        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
21664            ::mavlink_core::error::ParserError::InvalidFlag {
21665                flag_type: "MavModeFlag",
21666                value: tmp as u64,
21667            },
21668        )?;
21669        let tmp = buf.get_u8()?;
21670        __struct.system_status =
21671            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21672                enum_type: "MavState",
21673                value: tmp as u64,
21674            })?;
21675        __struct.mavlink_version = buf.get_u8()?;
21676        Ok(__struct)
21677    }
21678    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21679        let mut __tmp = BytesMut::new(bytes);
21680        #[allow(clippy::absurd_extreme_comparisons)]
21681        #[allow(unused_comparisons)]
21682        if __tmp.remaining() < Self::ENCODED_LEN {
21683            panic!(
21684                "buffer is too small (need {} bytes, but got {})",
21685                Self::ENCODED_LEN,
21686                __tmp.remaining(),
21687            )
21688        }
21689        __tmp.put_u32_le(self.custom_mode);
21690        __tmp.put_u8(self.mavtype as u8);
21691        __tmp.put_u8(self.autopilot as u8);
21692        __tmp.put_u8(self.base_mode.bits() as u8);
21693        __tmp.put_u8(self.system_status as u8);
21694        __tmp.put_u8(self.mavlink_version);
21695        if matches!(version, MavlinkVersion::V2) {
21696            let len = __tmp.len();
21697            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21698        } else {
21699            __tmp.len()
21700        }
21701    }
21702}
21703#[doc = "Herelink Telemetry."]
21704#[doc = ""]
21705#[doc = "ID: 50003"]
21706#[derive(Debug, Clone, PartialEq)]
21707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21708#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21709#[cfg_attr(feature = "ts", derive(TS))]
21710#[cfg_attr(feature = "ts", ts(export))]
21711pub struct HERELINK_TELEM_DATA {
21712    pub rf_freq: u32,
21713    pub link_bw: u32,
21714    pub link_rate: u32,
21715    pub snr: i16,
21716    pub cpu_temp: i16,
21717    pub board_temp: i16,
21718    pub rssi: u8,
21719}
21720impl HERELINK_TELEM_DATA {
21721    pub const ENCODED_LEN: usize = 19usize;
21722    pub const DEFAULT: Self = Self {
21723        rf_freq: 0_u32,
21724        link_bw: 0_u32,
21725        link_rate: 0_u32,
21726        snr: 0_i16,
21727        cpu_temp: 0_i16,
21728        board_temp: 0_i16,
21729        rssi: 0_u8,
21730    };
21731    #[cfg(feature = "arbitrary")]
21732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21733        use arbitrary::{Arbitrary, Unstructured};
21734        let mut buf = [0u8; 1024];
21735        rng.fill_bytes(&mut buf);
21736        let mut unstructured = Unstructured::new(&buf);
21737        Self::arbitrary(&mut unstructured).unwrap_or_default()
21738    }
21739}
21740impl Default for HERELINK_TELEM_DATA {
21741    fn default() -> Self {
21742        Self::DEFAULT.clone()
21743    }
21744}
21745impl MessageData for HERELINK_TELEM_DATA {
21746    type Message = MavMessage;
21747    const ID: u32 = 50003u32;
21748    const NAME: &'static str = "HERELINK_TELEM";
21749    const EXTRA_CRC: u8 = 62u8;
21750    const ENCODED_LEN: usize = 19usize;
21751    fn deser(
21752        _version: MavlinkVersion,
21753        __input: &[u8],
21754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21755        let avail_len = __input.len();
21756        let mut payload_buf = [0; Self::ENCODED_LEN];
21757        let mut buf = if avail_len < Self::ENCODED_LEN {
21758            payload_buf[0..avail_len].copy_from_slice(__input);
21759            Bytes::new(&payload_buf)
21760        } else {
21761            Bytes::new(__input)
21762        };
21763        let mut __struct = Self::default();
21764        __struct.rf_freq = buf.get_u32_le()?;
21765        __struct.link_bw = buf.get_u32_le()?;
21766        __struct.link_rate = buf.get_u32_le()?;
21767        __struct.snr = buf.get_i16_le()?;
21768        __struct.cpu_temp = buf.get_i16_le()?;
21769        __struct.board_temp = buf.get_i16_le()?;
21770        __struct.rssi = buf.get_u8()?;
21771        Ok(__struct)
21772    }
21773    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21774        let mut __tmp = BytesMut::new(bytes);
21775        #[allow(clippy::absurd_extreme_comparisons)]
21776        #[allow(unused_comparisons)]
21777        if __tmp.remaining() < Self::ENCODED_LEN {
21778            panic!(
21779                "buffer is too small (need {} bytes, but got {})",
21780                Self::ENCODED_LEN,
21781                __tmp.remaining(),
21782            )
21783        }
21784        __tmp.put_u32_le(self.rf_freq);
21785        __tmp.put_u32_le(self.link_bw);
21786        __tmp.put_u32_le(self.link_rate);
21787        __tmp.put_i16_le(self.snr);
21788        __tmp.put_i16_le(self.cpu_temp);
21789        __tmp.put_i16_le(self.board_temp);
21790        __tmp.put_u8(self.rssi);
21791        if matches!(version, MavlinkVersion::V2) {
21792            let len = __tmp.len();
21793            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21794        } else {
21795            __tmp.len()
21796        }
21797    }
21798}
21799#[doc = "Information about video stream."]
21800#[doc = ""]
21801#[doc = "ID: 50002"]
21802#[derive(Debug, Clone, PartialEq)]
21803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21805#[cfg_attr(feature = "ts", derive(TS))]
21806#[cfg_attr(feature = "ts", ts(export))]
21807pub struct HERELINK_VIDEO_STREAM_INFORMATION_DATA {
21808    #[doc = "Frame rate."]
21809    pub framerate: f32,
21810    #[doc = "Bit rate."]
21811    pub bitrate: u32,
21812    #[doc = "Horizontal resolution."]
21813    pub resolution_h: u16,
21814    #[doc = "Vertical resolution."]
21815    pub resolution_v: u16,
21816    #[doc = "Video image rotation clockwise."]
21817    pub rotation: u16,
21818    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
21819    pub camera_id: u8,
21820    #[doc = "Number of streams available."]
21821    pub status: u8,
21822    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
21823    #[cfg_attr(feature = "ts", ts(type = "string"))]
21824    pub uri: CharArray<230>,
21825}
21826impl HERELINK_VIDEO_STREAM_INFORMATION_DATA {
21827    pub const ENCODED_LEN: usize = 246usize;
21828    pub const DEFAULT: Self = Self {
21829        framerate: 0.0_f32,
21830        bitrate: 0_u32,
21831        resolution_h: 0_u16,
21832        resolution_v: 0_u16,
21833        rotation: 0_u16,
21834        camera_id: 0_u8,
21835        status: 0_u8,
21836        uri: CharArray::new([0_u8; 230usize]),
21837    };
21838    #[cfg(feature = "arbitrary")]
21839    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21840        use arbitrary::{Arbitrary, Unstructured};
21841        let mut buf = [0u8; 1024];
21842        rng.fill_bytes(&mut buf);
21843        let mut unstructured = Unstructured::new(&buf);
21844        Self::arbitrary(&mut unstructured).unwrap_or_default()
21845    }
21846}
21847impl Default for HERELINK_VIDEO_STREAM_INFORMATION_DATA {
21848    fn default() -> Self {
21849        Self::DEFAULT.clone()
21850    }
21851}
21852impl MessageData for HERELINK_VIDEO_STREAM_INFORMATION_DATA {
21853    type Message = MavMessage;
21854    const ID: u32 = 50002u32;
21855    const NAME: &'static str = "HERELINK_VIDEO_STREAM_INFORMATION";
21856    const EXTRA_CRC: u8 = 181u8;
21857    const ENCODED_LEN: usize = 246usize;
21858    fn deser(
21859        _version: MavlinkVersion,
21860        __input: &[u8],
21861    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21862        let avail_len = __input.len();
21863        let mut payload_buf = [0; Self::ENCODED_LEN];
21864        let mut buf = if avail_len < Self::ENCODED_LEN {
21865            payload_buf[0..avail_len].copy_from_slice(__input);
21866            Bytes::new(&payload_buf)
21867        } else {
21868            Bytes::new(__input)
21869        };
21870        let mut __struct = Self::default();
21871        __struct.framerate = buf.get_f32_le()?;
21872        __struct.bitrate = buf.get_u32_le()?;
21873        __struct.resolution_h = buf.get_u16_le()?;
21874        __struct.resolution_v = buf.get_u16_le()?;
21875        __struct.rotation = buf.get_u16_le()?;
21876        __struct.camera_id = buf.get_u8()?;
21877        __struct.status = buf.get_u8()?;
21878        let mut tmp = [0_u8; 230usize];
21879        for v in &mut tmp {
21880            *v = buf.get_u8()?;
21881        }
21882        __struct.uri = CharArray::new(tmp);
21883        Ok(__struct)
21884    }
21885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21886        let mut __tmp = BytesMut::new(bytes);
21887        #[allow(clippy::absurd_extreme_comparisons)]
21888        #[allow(unused_comparisons)]
21889        if __tmp.remaining() < Self::ENCODED_LEN {
21890            panic!(
21891                "buffer is too small (need {} bytes, but got {})",
21892                Self::ENCODED_LEN,
21893                __tmp.remaining(),
21894            )
21895        }
21896        __tmp.put_f32_le(self.framerate);
21897        __tmp.put_u32_le(self.bitrate);
21898        __tmp.put_u16_le(self.resolution_h);
21899        __tmp.put_u16_le(self.resolution_v);
21900        __tmp.put_u16_le(self.rotation);
21901        __tmp.put_u8(self.camera_id);
21902        __tmp.put_u8(self.status);
21903        for val in &self.uri {
21904            __tmp.put_u8(*val);
21905        }
21906        if matches!(version, MavlinkVersion::V2) {
21907            let len = __tmp.len();
21908            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21909        } else {
21910            __tmp.len()
21911        }
21912    }
21913}
21914#[doc = "The IMU readings in SI units in NED body frame."]
21915#[doc = ""]
21916#[doc = "ID: 105"]
21917#[derive(Debug, Clone, PartialEq)]
21918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21920#[cfg_attr(feature = "ts", derive(TS))]
21921#[cfg_attr(feature = "ts", ts(export))]
21922pub struct HIGHRES_IMU_DATA {
21923    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21924    pub time_usec: u64,
21925    #[doc = "X acceleration"]
21926    pub xacc: f32,
21927    #[doc = "Y acceleration"]
21928    pub yacc: f32,
21929    #[doc = "Z acceleration"]
21930    pub zacc: f32,
21931    #[doc = "Angular speed around X axis"]
21932    pub xgyro: f32,
21933    #[doc = "Angular speed around Y axis"]
21934    pub ygyro: f32,
21935    #[doc = "Angular speed around Z axis"]
21936    pub zgyro: f32,
21937    #[doc = "X Magnetic field"]
21938    pub xmag: f32,
21939    #[doc = "Y Magnetic field"]
21940    pub ymag: f32,
21941    #[doc = "Z Magnetic field"]
21942    pub zmag: f32,
21943    #[doc = "Absolute pressure"]
21944    pub abs_pressure: f32,
21945    #[doc = "Differential pressure"]
21946    pub diff_pressure: f32,
21947    #[doc = "Altitude calculated from pressure"]
21948    pub pressure_alt: f32,
21949    #[doc = "Temperature"]
21950    pub temperature: f32,
21951    #[doc = "Bitmap for fields that have updated since last message"]
21952    pub fields_updated: HighresImuUpdatedFlags,
21953    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
21954    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21955    pub id: u8,
21956}
21957impl HIGHRES_IMU_DATA {
21958    pub const ENCODED_LEN: usize = 63usize;
21959    pub const DEFAULT: Self = Self {
21960        time_usec: 0_u64,
21961        xacc: 0.0_f32,
21962        yacc: 0.0_f32,
21963        zacc: 0.0_f32,
21964        xgyro: 0.0_f32,
21965        ygyro: 0.0_f32,
21966        zgyro: 0.0_f32,
21967        xmag: 0.0_f32,
21968        ymag: 0.0_f32,
21969        zmag: 0.0_f32,
21970        abs_pressure: 0.0_f32,
21971        diff_pressure: 0.0_f32,
21972        pressure_alt: 0.0_f32,
21973        temperature: 0.0_f32,
21974        fields_updated: HighresImuUpdatedFlags::DEFAULT,
21975        id: 0_u8,
21976    };
21977    #[cfg(feature = "arbitrary")]
21978    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21979        use arbitrary::{Arbitrary, Unstructured};
21980        let mut buf = [0u8; 1024];
21981        rng.fill_bytes(&mut buf);
21982        let mut unstructured = Unstructured::new(&buf);
21983        Self::arbitrary(&mut unstructured).unwrap_or_default()
21984    }
21985}
21986impl Default for HIGHRES_IMU_DATA {
21987    fn default() -> Self {
21988        Self::DEFAULT.clone()
21989    }
21990}
21991impl MessageData for HIGHRES_IMU_DATA {
21992    type Message = MavMessage;
21993    const ID: u32 = 105u32;
21994    const NAME: &'static str = "HIGHRES_IMU";
21995    const EXTRA_CRC: u8 = 93u8;
21996    const ENCODED_LEN: usize = 63usize;
21997    fn deser(
21998        _version: MavlinkVersion,
21999        __input: &[u8],
22000    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22001        let avail_len = __input.len();
22002        let mut payload_buf = [0; Self::ENCODED_LEN];
22003        let mut buf = if avail_len < Self::ENCODED_LEN {
22004            payload_buf[0..avail_len].copy_from_slice(__input);
22005            Bytes::new(&payload_buf)
22006        } else {
22007            Bytes::new(__input)
22008        };
22009        let mut __struct = Self::default();
22010        __struct.time_usec = buf.get_u64_le()?;
22011        __struct.xacc = buf.get_f32_le()?;
22012        __struct.yacc = buf.get_f32_le()?;
22013        __struct.zacc = buf.get_f32_le()?;
22014        __struct.xgyro = buf.get_f32_le()?;
22015        __struct.ygyro = buf.get_f32_le()?;
22016        __struct.zgyro = buf.get_f32_le()?;
22017        __struct.xmag = buf.get_f32_le()?;
22018        __struct.ymag = buf.get_f32_le()?;
22019        __struct.zmag = buf.get_f32_le()?;
22020        __struct.abs_pressure = buf.get_f32_le()?;
22021        __struct.diff_pressure = buf.get_f32_le()?;
22022        __struct.pressure_alt = buf.get_f32_le()?;
22023        __struct.temperature = buf.get_f32_le()?;
22024        let tmp = buf.get_u16_le()?;
22025        __struct.fields_updated =
22026            HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
22027                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
22028                    flag_type: "HighresImuUpdatedFlags",
22029                    value: tmp as u64,
22030                })?;
22031        __struct.id = buf.get_u8()?;
22032        Ok(__struct)
22033    }
22034    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22035        let mut __tmp = BytesMut::new(bytes);
22036        #[allow(clippy::absurd_extreme_comparisons)]
22037        #[allow(unused_comparisons)]
22038        if __tmp.remaining() < Self::ENCODED_LEN {
22039            panic!(
22040                "buffer is too small (need {} bytes, but got {})",
22041                Self::ENCODED_LEN,
22042                __tmp.remaining(),
22043            )
22044        }
22045        __tmp.put_u64_le(self.time_usec);
22046        __tmp.put_f32_le(self.xacc);
22047        __tmp.put_f32_le(self.yacc);
22048        __tmp.put_f32_le(self.zacc);
22049        __tmp.put_f32_le(self.xgyro);
22050        __tmp.put_f32_le(self.ygyro);
22051        __tmp.put_f32_le(self.zgyro);
22052        __tmp.put_f32_le(self.xmag);
22053        __tmp.put_f32_le(self.ymag);
22054        __tmp.put_f32_le(self.zmag);
22055        __tmp.put_f32_le(self.abs_pressure);
22056        __tmp.put_f32_le(self.diff_pressure);
22057        __tmp.put_f32_le(self.pressure_alt);
22058        __tmp.put_f32_le(self.temperature);
22059        __tmp.put_u16_le(self.fields_updated.bits() as u16);
22060        if matches!(version, MavlinkVersion::V2) {
22061            __tmp.put_u8(self.id);
22062            let len = __tmp.len();
22063            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22064        } else {
22065            __tmp.len()
22066        }
22067    }
22068}
22069#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
22070#[doc = "Message appropriate for high latency connections like Iridium."]
22071#[doc = ""]
22072#[doc = "ID: 234"]
22073#[derive(Debug, Clone, PartialEq)]
22074#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22076#[cfg_attr(feature = "ts", derive(TS))]
22077#[cfg_attr(feature = "ts", ts(export))]
22078pub struct HIGH_LATENCY_DATA {
22079    #[doc = "A bitfield for use for autopilot-specific flags."]
22080    pub custom_mode: u32,
22081    #[doc = "Latitude"]
22082    pub latitude: i32,
22083    #[doc = "Longitude"]
22084    pub longitude: i32,
22085    #[doc = "roll"]
22086    pub roll: i16,
22087    #[doc = "pitch"]
22088    pub pitch: i16,
22089    #[doc = "heading"]
22090    pub heading: u16,
22091    #[doc = "heading setpoint"]
22092    pub heading_sp: i16,
22093    #[doc = "Altitude above mean sea level"]
22094    pub altitude_amsl: i16,
22095    #[doc = "Altitude setpoint relative to the home position"]
22096    pub altitude_sp: i16,
22097    #[doc = "distance to target"]
22098    pub wp_distance: u16,
22099    #[doc = "Bitmap of enabled system modes."]
22100    pub base_mode: MavModeFlag,
22101    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
22102    pub landed_state: MavLandedState,
22103    #[doc = "throttle (percentage)"]
22104    pub throttle: i8,
22105    #[doc = "airspeed"]
22106    pub airspeed: u8,
22107    #[doc = "airspeed setpoint"]
22108    pub airspeed_sp: u8,
22109    #[doc = "groundspeed"]
22110    pub groundspeed: u8,
22111    #[doc = "climb rate"]
22112    pub climb_rate: i8,
22113    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
22114    pub gps_nsat: u8,
22115    #[doc = "GPS Fix type."]
22116    pub gps_fix_type: GpsFixType,
22117    #[doc = "Remaining battery (percentage)"]
22118    pub battery_remaining: u8,
22119    #[doc = "Autopilot temperature (degrees C)"]
22120    pub temperature: i8,
22121    #[doc = "Air temperature (degrees C) from airspeed sensor"]
22122    pub temperature_air: i8,
22123    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
22124    pub failsafe: u8,
22125    #[doc = "current waypoint number"]
22126    pub wp_num: u8,
22127}
22128impl HIGH_LATENCY_DATA {
22129    pub const ENCODED_LEN: usize = 40usize;
22130    pub const DEFAULT: Self = Self {
22131        custom_mode: 0_u32,
22132        latitude: 0_i32,
22133        longitude: 0_i32,
22134        roll: 0_i16,
22135        pitch: 0_i16,
22136        heading: 0_u16,
22137        heading_sp: 0_i16,
22138        altitude_amsl: 0_i16,
22139        altitude_sp: 0_i16,
22140        wp_distance: 0_u16,
22141        base_mode: MavModeFlag::DEFAULT,
22142        landed_state: MavLandedState::DEFAULT,
22143        throttle: 0_i8,
22144        airspeed: 0_u8,
22145        airspeed_sp: 0_u8,
22146        groundspeed: 0_u8,
22147        climb_rate: 0_i8,
22148        gps_nsat: 0_u8,
22149        gps_fix_type: GpsFixType::DEFAULT,
22150        battery_remaining: 0_u8,
22151        temperature: 0_i8,
22152        temperature_air: 0_i8,
22153        failsafe: 0_u8,
22154        wp_num: 0_u8,
22155    };
22156    #[cfg(feature = "arbitrary")]
22157    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22158        use arbitrary::{Arbitrary, Unstructured};
22159        let mut buf = [0u8; 1024];
22160        rng.fill_bytes(&mut buf);
22161        let mut unstructured = Unstructured::new(&buf);
22162        Self::arbitrary(&mut unstructured).unwrap_or_default()
22163    }
22164}
22165impl Default for HIGH_LATENCY_DATA {
22166    fn default() -> Self {
22167        Self::DEFAULT.clone()
22168    }
22169}
22170impl MessageData for HIGH_LATENCY_DATA {
22171    type Message = MavMessage;
22172    const ID: u32 = 234u32;
22173    const NAME: &'static str = "HIGH_LATENCY";
22174    const EXTRA_CRC: u8 = 150u8;
22175    const ENCODED_LEN: usize = 40usize;
22176    fn deser(
22177        _version: MavlinkVersion,
22178        __input: &[u8],
22179    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22180        let avail_len = __input.len();
22181        let mut payload_buf = [0; Self::ENCODED_LEN];
22182        let mut buf = if avail_len < Self::ENCODED_LEN {
22183            payload_buf[0..avail_len].copy_from_slice(__input);
22184            Bytes::new(&payload_buf)
22185        } else {
22186            Bytes::new(__input)
22187        };
22188        let mut __struct = Self::default();
22189        __struct.custom_mode = buf.get_u32_le()?;
22190        __struct.latitude = buf.get_i32_le()?;
22191        __struct.longitude = buf.get_i32_le()?;
22192        __struct.roll = buf.get_i16_le()?;
22193        __struct.pitch = buf.get_i16_le()?;
22194        __struct.heading = buf.get_u16_le()?;
22195        __struct.heading_sp = buf.get_i16_le()?;
22196        __struct.altitude_amsl = buf.get_i16_le()?;
22197        __struct.altitude_sp = buf.get_i16_le()?;
22198        __struct.wp_distance = buf.get_u16_le()?;
22199        let tmp = buf.get_u8()?;
22200        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
22201            ::mavlink_core::error::ParserError::InvalidFlag {
22202                flag_type: "MavModeFlag",
22203                value: tmp as u64,
22204            },
22205        )?;
22206        let tmp = buf.get_u8()?;
22207        __struct.landed_state =
22208            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22209                enum_type: "MavLandedState",
22210                value: tmp as u64,
22211            })?;
22212        __struct.throttle = buf.get_i8()?;
22213        __struct.airspeed = buf.get_u8()?;
22214        __struct.airspeed_sp = buf.get_u8()?;
22215        __struct.groundspeed = buf.get_u8()?;
22216        __struct.climb_rate = buf.get_i8()?;
22217        __struct.gps_nsat = buf.get_u8()?;
22218        let tmp = buf.get_u8()?;
22219        __struct.gps_fix_type =
22220            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22221                enum_type: "GpsFixType",
22222                value: tmp as u64,
22223            })?;
22224        __struct.battery_remaining = buf.get_u8()?;
22225        __struct.temperature = buf.get_i8()?;
22226        __struct.temperature_air = buf.get_i8()?;
22227        __struct.failsafe = buf.get_u8()?;
22228        __struct.wp_num = buf.get_u8()?;
22229        Ok(__struct)
22230    }
22231    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22232        let mut __tmp = BytesMut::new(bytes);
22233        #[allow(clippy::absurd_extreme_comparisons)]
22234        #[allow(unused_comparisons)]
22235        if __tmp.remaining() < Self::ENCODED_LEN {
22236            panic!(
22237                "buffer is too small (need {} bytes, but got {})",
22238                Self::ENCODED_LEN,
22239                __tmp.remaining(),
22240            )
22241        }
22242        __tmp.put_u32_le(self.custom_mode);
22243        __tmp.put_i32_le(self.latitude);
22244        __tmp.put_i32_le(self.longitude);
22245        __tmp.put_i16_le(self.roll);
22246        __tmp.put_i16_le(self.pitch);
22247        __tmp.put_u16_le(self.heading);
22248        __tmp.put_i16_le(self.heading_sp);
22249        __tmp.put_i16_le(self.altitude_amsl);
22250        __tmp.put_i16_le(self.altitude_sp);
22251        __tmp.put_u16_le(self.wp_distance);
22252        __tmp.put_u8(self.base_mode.bits() as u8);
22253        __tmp.put_u8(self.landed_state as u8);
22254        __tmp.put_i8(self.throttle);
22255        __tmp.put_u8(self.airspeed);
22256        __tmp.put_u8(self.airspeed_sp);
22257        __tmp.put_u8(self.groundspeed);
22258        __tmp.put_i8(self.climb_rate);
22259        __tmp.put_u8(self.gps_nsat);
22260        __tmp.put_u8(self.gps_fix_type as u8);
22261        __tmp.put_u8(self.battery_remaining);
22262        __tmp.put_i8(self.temperature);
22263        __tmp.put_i8(self.temperature_air);
22264        __tmp.put_u8(self.failsafe);
22265        __tmp.put_u8(self.wp_num);
22266        if matches!(version, MavlinkVersion::V2) {
22267            let len = __tmp.len();
22268            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22269        } else {
22270            __tmp.len()
22271        }
22272    }
22273}
22274#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
22275#[doc = ""]
22276#[doc = "ID: 235"]
22277#[derive(Debug, Clone, PartialEq)]
22278#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22279#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22280#[cfg_attr(feature = "ts", derive(TS))]
22281#[cfg_attr(feature = "ts", ts(export))]
22282pub struct HIGH_LATENCY2_DATA {
22283    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
22284    pub timestamp: u32,
22285    #[doc = "Latitude"]
22286    pub latitude: i32,
22287    #[doc = "Longitude"]
22288    pub longitude: i32,
22289    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
22290    pub custom_mode: u16,
22291    #[doc = "Altitude above mean sea level"]
22292    pub altitude: i16,
22293    #[doc = "Altitude setpoint"]
22294    pub target_altitude: i16,
22295    #[doc = "Distance to target waypoint or position"]
22296    pub target_distance: u16,
22297    #[doc = "Current waypoint number"]
22298    pub wp_num: u16,
22299    #[doc = "Bitmap of failure flags."]
22300    pub failure_flags: HlFailureFlag,
22301    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
22302    pub mavtype: MavType,
22303    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
22304    pub autopilot: MavAutopilot,
22305    #[doc = "Heading"]
22306    pub heading: u8,
22307    #[doc = "Heading setpoint"]
22308    pub target_heading: u8,
22309    #[doc = "Throttle"]
22310    pub throttle: u8,
22311    #[doc = "Airspeed"]
22312    pub airspeed: u8,
22313    #[doc = "Airspeed setpoint"]
22314    pub airspeed_sp: u8,
22315    #[doc = "Groundspeed"]
22316    pub groundspeed: u8,
22317    #[doc = "Windspeed"]
22318    pub windspeed: u8,
22319    #[doc = "Wind heading"]
22320    pub wind_heading: u8,
22321    #[doc = "Maximum error horizontal position since last message"]
22322    pub eph: u8,
22323    #[doc = "Maximum error vertical position since last message"]
22324    pub epv: u8,
22325    #[doc = "Air temperature"]
22326    pub temperature_air: i8,
22327    #[doc = "Maximum climb rate magnitude since last message"]
22328    pub climb_rate: i8,
22329    #[doc = "Battery level (-1 if field not provided)."]
22330    pub battery: i8,
22331    #[doc = "Field for custom payload."]
22332    pub custom0: i8,
22333    #[doc = "Field for custom payload."]
22334    pub custom1: i8,
22335    #[doc = "Field for custom payload."]
22336    pub custom2: i8,
22337}
22338impl HIGH_LATENCY2_DATA {
22339    pub const ENCODED_LEN: usize = 42usize;
22340    pub const DEFAULT: Self = Self {
22341        timestamp: 0_u32,
22342        latitude: 0_i32,
22343        longitude: 0_i32,
22344        custom_mode: 0_u16,
22345        altitude: 0_i16,
22346        target_altitude: 0_i16,
22347        target_distance: 0_u16,
22348        wp_num: 0_u16,
22349        failure_flags: HlFailureFlag::DEFAULT,
22350        mavtype: MavType::DEFAULT,
22351        autopilot: MavAutopilot::DEFAULT,
22352        heading: 0_u8,
22353        target_heading: 0_u8,
22354        throttle: 0_u8,
22355        airspeed: 0_u8,
22356        airspeed_sp: 0_u8,
22357        groundspeed: 0_u8,
22358        windspeed: 0_u8,
22359        wind_heading: 0_u8,
22360        eph: 0_u8,
22361        epv: 0_u8,
22362        temperature_air: 0_i8,
22363        climb_rate: 0_i8,
22364        battery: 0_i8,
22365        custom0: 0_i8,
22366        custom1: 0_i8,
22367        custom2: 0_i8,
22368    };
22369    #[cfg(feature = "arbitrary")]
22370    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22371        use arbitrary::{Arbitrary, Unstructured};
22372        let mut buf = [0u8; 1024];
22373        rng.fill_bytes(&mut buf);
22374        let mut unstructured = Unstructured::new(&buf);
22375        Self::arbitrary(&mut unstructured).unwrap_or_default()
22376    }
22377}
22378impl Default for HIGH_LATENCY2_DATA {
22379    fn default() -> Self {
22380        Self::DEFAULT.clone()
22381    }
22382}
22383impl MessageData for HIGH_LATENCY2_DATA {
22384    type Message = MavMessage;
22385    const ID: u32 = 235u32;
22386    const NAME: &'static str = "HIGH_LATENCY2";
22387    const EXTRA_CRC: u8 = 179u8;
22388    const ENCODED_LEN: usize = 42usize;
22389    fn deser(
22390        _version: MavlinkVersion,
22391        __input: &[u8],
22392    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22393        let avail_len = __input.len();
22394        let mut payload_buf = [0; Self::ENCODED_LEN];
22395        let mut buf = if avail_len < Self::ENCODED_LEN {
22396            payload_buf[0..avail_len].copy_from_slice(__input);
22397            Bytes::new(&payload_buf)
22398        } else {
22399            Bytes::new(__input)
22400        };
22401        let mut __struct = Self::default();
22402        __struct.timestamp = buf.get_u32_le()?;
22403        __struct.latitude = buf.get_i32_le()?;
22404        __struct.longitude = buf.get_i32_le()?;
22405        __struct.custom_mode = buf.get_u16_le()?;
22406        __struct.altitude = buf.get_i16_le()?;
22407        __struct.target_altitude = buf.get_i16_le()?;
22408        __struct.target_distance = buf.get_u16_le()?;
22409        __struct.wp_num = buf.get_u16_le()?;
22410        let tmp = buf.get_u16_le()?;
22411        __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
22412            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
22413                flag_type: "HlFailureFlag",
22414                value: tmp as u64,
22415            })?;
22416        let tmp = buf.get_u8()?;
22417        __struct.mavtype =
22418            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22419                enum_type: "MavType",
22420                value: tmp as u64,
22421            })?;
22422        let tmp = buf.get_u8()?;
22423        __struct.autopilot =
22424            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22425                enum_type: "MavAutopilot",
22426                value: tmp as u64,
22427            })?;
22428        __struct.heading = buf.get_u8()?;
22429        __struct.target_heading = buf.get_u8()?;
22430        __struct.throttle = buf.get_u8()?;
22431        __struct.airspeed = buf.get_u8()?;
22432        __struct.airspeed_sp = buf.get_u8()?;
22433        __struct.groundspeed = buf.get_u8()?;
22434        __struct.windspeed = buf.get_u8()?;
22435        __struct.wind_heading = buf.get_u8()?;
22436        __struct.eph = buf.get_u8()?;
22437        __struct.epv = buf.get_u8()?;
22438        __struct.temperature_air = buf.get_i8()?;
22439        __struct.climb_rate = buf.get_i8()?;
22440        __struct.battery = buf.get_i8()?;
22441        __struct.custom0 = buf.get_i8()?;
22442        __struct.custom1 = buf.get_i8()?;
22443        __struct.custom2 = buf.get_i8()?;
22444        Ok(__struct)
22445    }
22446    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22447        let mut __tmp = BytesMut::new(bytes);
22448        #[allow(clippy::absurd_extreme_comparisons)]
22449        #[allow(unused_comparisons)]
22450        if __tmp.remaining() < Self::ENCODED_LEN {
22451            panic!(
22452                "buffer is too small (need {} bytes, but got {})",
22453                Self::ENCODED_LEN,
22454                __tmp.remaining(),
22455            )
22456        }
22457        __tmp.put_u32_le(self.timestamp);
22458        __tmp.put_i32_le(self.latitude);
22459        __tmp.put_i32_le(self.longitude);
22460        __tmp.put_u16_le(self.custom_mode);
22461        __tmp.put_i16_le(self.altitude);
22462        __tmp.put_i16_le(self.target_altitude);
22463        __tmp.put_u16_le(self.target_distance);
22464        __tmp.put_u16_le(self.wp_num);
22465        __tmp.put_u16_le(self.failure_flags.bits() as u16);
22466        __tmp.put_u8(self.mavtype as u8);
22467        __tmp.put_u8(self.autopilot as u8);
22468        __tmp.put_u8(self.heading);
22469        __tmp.put_u8(self.target_heading);
22470        __tmp.put_u8(self.throttle);
22471        __tmp.put_u8(self.airspeed);
22472        __tmp.put_u8(self.airspeed_sp);
22473        __tmp.put_u8(self.groundspeed);
22474        __tmp.put_u8(self.windspeed);
22475        __tmp.put_u8(self.wind_heading);
22476        __tmp.put_u8(self.eph);
22477        __tmp.put_u8(self.epv);
22478        __tmp.put_i8(self.temperature_air);
22479        __tmp.put_i8(self.climb_rate);
22480        __tmp.put_i8(self.battery);
22481        __tmp.put_i8(self.custom0);
22482        __tmp.put_i8(self.custom1);
22483        __tmp.put_i8(self.custom2);
22484        if matches!(version, MavlinkVersion::V2) {
22485            let len = __tmp.len();
22486            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22487        } else {
22488            __tmp.len()
22489        }
22490    }
22491}
22492#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
22493#[doc = ""]
22494#[doc = "ID: 93"]
22495#[derive(Debug, Clone, PartialEq)]
22496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22498#[cfg_attr(feature = "ts", derive(TS))]
22499#[cfg_attr(feature = "ts", ts(export))]
22500pub struct HIL_ACTUATOR_CONTROLS_DATA {
22501    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22502    pub time_usec: u64,
22503    #[doc = "Flags bitmask."]
22504    pub flags: HilActuatorControlsFlags,
22505    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
22506    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22507    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22508    pub controls: [f32; 16],
22509    #[doc = "System mode. Includes arming state."]
22510    pub mode: MavModeFlag,
22511}
22512impl HIL_ACTUATOR_CONTROLS_DATA {
22513    pub const ENCODED_LEN: usize = 81usize;
22514    pub const DEFAULT: Self = Self {
22515        time_usec: 0_u64,
22516        flags: HilActuatorControlsFlags::DEFAULT,
22517        controls: [0.0_f32; 16usize],
22518        mode: MavModeFlag::DEFAULT,
22519    };
22520    #[cfg(feature = "arbitrary")]
22521    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22522        use arbitrary::{Arbitrary, Unstructured};
22523        let mut buf = [0u8; 1024];
22524        rng.fill_bytes(&mut buf);
22525        let mut unstructured = Unstructured::new(&buf);
22526        Self::arbitrary(&mut unstructured).unwrap_or_default()
22527    }
22528}
22529impl Default for HIL_ACTUATOR_CONTROLS_DATA {
22530    fn default() -> Self {
22531        Self::DEFAULT.clone()
22532    }
22533}
22534impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
22535    type Message = MavMessage;
22536    const ID: u32 = 93u32;
22537    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
22538    const EXTRA_CRC: u8 = 47u8;
22539    const ENCODED_LEN: usize = 81usize;
22540    fn deser(
22541        _version: MavlinkVersion,
22542        __input: &[u8],
22543    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22544        let avail_len = __input.len();
22545        let mut payload_buf = [0; Self::ENCODED_LEN];
22546        let mut buf = if avail_len < Self::ENCODED_LEN {
22547            payload_buf[0..avail_len].copy_from_slice(__input);
22548            Bytes::new(&payload_buf)
22549        } else {
22550            Bytes::new(__input)
22551        };
22552        let mut __struct = Self::default();
22553        __struct.time_usec = buf.get_u64_le()?;
22554        let tmp = buf.get_u64_le()?;
22555        __struct.flags =
22556            HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
22557                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
22558                flag_type: "HilActuatorControlsFlags",
22559                value: tmp as u64,
22560            })?;
22561        for v in &mut __struct.controls {
22562            let val = buf.get_f32_le()?;
22563            *v = val;
22564        }
22565        let tmp = buf.get_u8()?;
22566        __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
22567            ::mavlink_core::error::ParserError::InvalidFlag {
22568                flag_type: "MavModeFlag",
22569                value: tmp as u64,
22570            },
22571        )?;
22572        Ok(__struct)
22573    }
22574    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22575        let mut __tmp = BytesMut::new(bytes);
22576        #[allow(clippy::absurd_extreme_comparisons)]
22577        #[allow(unused_comparisons)]
22578        if __tmp.remaining() < Self::ENCODED_LEN {
22579            panic!(
22580                "buffer is too small (need {} bytes, but got {})",
22581                Self::ENCODED_LEN,
22582                __tmp.remaining(),
22583            )
22584        }
22585        __tmp.put_u64_le(self.time_usec);
22586        __tmp.put_u64_le(self.flags.bits() as u64);
22587        for val in &self.controls {
22588            __tmp.put_f32_le(*val);
22589        }
22590        __tmp.put_u8(self.mode.bits() as u8);
22591        if matches!(version, MavlinkVersion::V2) {
22592            let len = __tmp.len();
22593            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22594        } else {
22595            __tmp.len()
22596        }
22597    }
22598}
22599#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
22600#[doc = ""]
22601#[doc = "ID: 91"]
22602#[derive(Debug, Clone, PartialEq)]
22603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22605#[cfg_attr(feature = "ts", derive(TS))]
22606#[cfg_attr(feature = "ts", ts(export))]
22607pub struct HIL_CONTROLS_DATA {
22608    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22609    pub time_usec: u64,
22610    #[doc = "Control output -1 .. 1"]
22611    pub roll_ailerons: f32,
22612    #[doc = "Control output -1 .. 1"]
22613    pub pitch_elevator: f32,
22614    #[doc = "Control output -1 .. 1"]
22615    pub yaw_rudder: f32,
22616    #[doc = "Throttle 0 .. 1"]
22617    pub throttle: f32,
22618    #[doc = "Aux 1, -1 .. 1"]
22619    pub aux1: f32,
22620    #[doc = "Aux 2, -1 .. 1"]
22621    pub aux2: f32,
22622    #[doc = "Aux 3, -1 .. 1"]
22623    pub aux3: f32,
22624    #[doc = "Aux 4, -1 .. 1"]
22625    pub aux4: f32,
22626    #[doc = "System mode."]
22627    pub mode: MavMode,
22628    #[doc = "Navigation mode (MAV_NAV_MODE)"]
22629    pub nav_mode: u8,
22630}
22631impl HIL_CONTROLS_DATA {
22632    pub const ENCODED_LEN: usize = 42usize;
22633    pub const DEFAULT: Self = Self {
22634        time_usec: 0_u64,
22635        roll_ailerons: 0.0_f32,
22636        pitch_elevator: 0.0_f32,
22637        yaw_rudder: 0.0_f32,
22638        throttle: 0.0_f32,
22639        aux1: 0.0_f32,
22640        aux2: 0.0_f32,
22641        aux3: 0.0_f32,
22642        aux4: 0.0_f32,
22643        mode: MavMode::DEFAULT,
22644        nav_mode: 0_u8,
22645    };
22646    #[cfg(feature = "arbitrary")]
22647    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22648        use arbitrary::{Arbitrary, Unstructured};
22649        let mut buf = [0u8; 1024];
22650        rng.fill_bytes(&mut buf);
22651        let mut unstructured = Unstructured::new(&buf);
22652        Self::arbitrary(&mut unstructured).unwrap_or_default()
22653    }
22654}
22655impl Default for HIL_CONTROLS_DATA {
22656    fn default() -> Self {
22657        Self::DEFAULT.clone()
22658    }
22659}
22660impl MessageData for HIL_CONTROLS_DATA {
22661    type Message = MavMessage;
22662    const ID: u32 = 91u32;
22663    const NAME: &'static str = "HIL_CONTROLS";
22664    const EXTRA_CRC: u8 = 63u8;
22665    const ENCODED_LEN: usize = 42usize;
22666    fn deser(
22667        _version: MavlinkVersion,
22668        __input: &[u8],
22669    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22670        let avail_len = __input.len();
22671        let mut payload_buf = [0; Self::ENCODED_LEN];
22672        let mut buf = if avail_len < Self::ENCODED_LEN {
22673            payload_buf[0..avail_len].copy_from_slice(__input);
22674            Bytes::new(&payload_buf)
22675        } else {
22676            Bytes::new(__input)
22677        };
22678        let mut __struct = Self::default();
22679        __struct.time_usec = buf.get_u64_le()?;
22680        __struct.roll_ailerons = buf.get_f32_le()?;
22681        __struct.pitch_elevator = buf.get_f32_le()?;
22682        __struct.yaw_rudder = buf.get_f32_le()?;
22683        __struct.throttle = buf.get_f32_le()?;
22684        __struct.aux1 = buf.get_f32_le()?;
22685        __struct.aux2 = buf.get_f32_le()?;
22686        __struct.aux3 = buf.get_f32_le()?;
22687        __struct.aux4 = buf.get_f32_le()?;
22688        let tmp = buf.get_u8()?;
22689        __struct.mode =
22690            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22691                enum_type: "MavMode",
22692                value: tmp as u64,
22693            })?;
22694        __struct.nav_mode = buf.get_u8()?;
22695        Ok(__struct)
22696    }
22697    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22698        let mut __tmp = BytesMut::new(bytes);
22699        #[allow(clippy::absurd_extreme_comparisons)]
22700        #[allow(unused_comparisons)]
22701        if __tmp.remaining() < Self::ENCODED_LEN {
22702            panic!(
22703                "buffer is too small (need {} bytes, but got {})",
22704                Self::ENCODED_LEN,
22705                __tmp.remaining(),
22706            )
22707        }
22708        __tmp.put_u64_le(self.time_usec);
22709        __tmp.put_f32_le(self.roll_ailerons);
22710        __tmp.put_f32_le(self.pitch_elevator);
22711        __tmp.put_f32_le(self.yaw_rudder);
22712        __tmp.put_f32_le(self.throttle);
22713        __tmp.put_f32_le(self.aux1);
22714        __tmp.put_f32_le(self.aux2);
22715        __tmp.put_f32_le(self.aux3);
22716        __tmp.put_f32_le(self.aux4);
22717        __tmp.put_u8(self.mode as u8);
22718        __tmp.put_u8(self.nav_mode);
22719        if matches!(version, MavlinkVersion::V2) {
22720            let len = __tmp.len();
22721            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22722        } else {
22723            __tmp.len()
22724        }
22725    }
22726}
22727#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
22728#[doc = ""]
22729#[doc = "ID: 113"]
22730#[derive(Debug, Clone, PartialEq)]
22731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22733#[cfg_attr(feature = "ts", derive(TS))]
22734#[cfg_attr(feature = "ts", ts(export))]
22735pub struct HIL_GPS_DATA {
22736    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22737    pub time_usec: u64,
22738    #[doc = "Latitude (WGS84)"]
22739    pub lat: i32,
22740    #[doc = "Longitude (WGS84)"]
22741    pub lon: i32,
22742    #[doc = "Altitude (MSL). Positive for up."]
22743    pub alt: i32,
22744    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
22745    pub eph: u16,
22746    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
22747    pub epv: u16,
22748    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
22749    pub vel: u16,
22750    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
22751    pub vn: i16,
22752    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
22753    pub ve: i16,
22754    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
22755    pub vd: i16,
22756    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
22757    pub cog: u16,
22758    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
22759    pub fix_type: u8,
22760    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
22761    pub satellites_visible: u8,
22762    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
22763    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22764    pub id: u8,
22765    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
22766    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22767    pub yaw: u16,
22768}
22769impl HIL_GPS_DATA {
22770    pub const ENCODED_LEN: usize = 39usize;
22771    pub const DEFAULT: Self = Self {
22772        time_usec: 0_u64,
22773        lat: 0_i32,
22774        lon: 0_i32,
22775        alt: 0_i32,
22776        eph: 0_u16,
22777        epv: 0_u16,
22778        vel: 0_u16,
22779        vn: 0_i16,
22780        ve: 0_i16,
22781        vd: 0_i16,
22782        cog: 0_u16,
22783        fix_type: 0_u8,
22784        satellites_visible: 0_u8,
22785        id: 0_u8,
22786        yaw: 0_u16,
22787    };
22788    #[cfg(feature = "arbitrary")]
22789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22790        use arbitrary::{Arbitrary, Unstructured};
22791        let mut buf = [0u8; 1024];
22792        rng.fill_bytes(&mut buf);
22793        let mut unstructured = Unstructured::new(&buf);
22794        Self::arbitrary(&mut unstructured).unwrap_or_default()
22795    }
22796}
22797impl Default for HIL_GPS_DATA {
22798    fn default() -> Self {
22799        Self::DEFAULT.clone()
22800    }
22801}
22802impl MessageData for HIL_GPS_DATA {
22803    type Message = MavMessage;
22804    const ID: u32 = 113u32;
22805    const NAME: &'static str = "HIL_GPS";
22806    const EXTRA_CRC: u8 = 124u8;
22807    const ENCODED_LEN: usize = 39usize;
22808    fn deser(
22809        _version: MavlinkVersion,
22810        __input: &[u8],
22811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22812        let avail_len = __input.len();
22813        let mut payload_buf = [0; Self::ENCODED_LEN];
22814        let mut buf = if avail_len < Self::ENCODED_LEN {
22815            payload_buf[0..avail_len].copy_from_slice(__input);
22816            Bytes::new(&payload_buf)
22817        } else {
22818            Bytes::new(__input)
22819        };
22820        let mut __struct = Self::default();
22821        __struct.time_usec = buf.get_u64_le()?;
22822        __struct.lat = buf.get_i32_le()?;
22823        __struct.lon = buf.get_i32_le()?;
22824        __struct.alt = buf.get_i32_le()?;
22825        __struct.eph = buf.get_u16_le()?;
22826        __struct.epv = buf.get_u16_le()?;
22827        __struct.vel = buf.get_u16_le()?;
22828        __struct.vn = buf.get_i16_le()?;
22829        __struct.ve = buf.get_i16_le()?;
22830        __struct.vd = buf.get_i16_le()?;
22831        __struct.cog = buf.get_u16_le()?;
22832        __struct.fix_type = buf.get_u8()?;
22833        __struct.satellites_visible = buf.get_u8()?;
22834        __struct.id = buf.get_u8()?;
22835        __struct.yaw = buf.get_u16_le()?;
22836        Ok(__struct)
22837    }
22838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22839        let mut __tmp = BytesMut::new(bytes);
22840        #[allow(clippy::absurd_extreme_comparisons)]
22841        #[allow(unused_comparisons)]
22842        if __tmp.remaining() < Self::ENCODED_LEN {
22843            panic!(
22844                "buffer is too small (need {} bytes, but got {})",
22845                Self::ENCODED_LEN,
22846                __tmp.remaining(),
22847            )
22848        }
22849        __tmp.put_u64_le(self.time_usec);
22850        __tmp.put_i32_le(self.lat);
22851        __tmp.put_i32_le(self.lon);
22852        __tmp.put_i32_le(self.alt);
22853        __tmp.put_u16_le(self.eph);
22854        __tmp.put_u16_le(self.epv);
22855        __tmp.put_u16_le(self.vel);
22856        __tmp.put_i16_le(self.vn);
22857        __tmp.put_i16_le(self.ve);
22858        __tmp.put_i16_le(self.vd);
22859        __tmp.put_u16_le(self.cog);
22860        __tmp.put_u8(self.fix_type);
22861        __tmp.put_u8(self.satellites_visible);
22862        if matches!(version, MavlinkVersion::V2) {
22863            __tmp.put_u8(self.id);
22864            __tmp.put_u16_le(self.yaw);
22865            let len = __tmp.len();
22866            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22867        } else {
22868            __tmp.len()
22869        }
22870    }
22871}
22872#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
22873#[doc = ""]
22874#[doc = "ID: 114"]
22875#[derive(Debug, Clone, PartialEq)]
22876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22877#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22878#[cfg_attr(feature = "ts", derive(TS))]
22879#[cfg_attr(feature = "ts", ts(export))]
22880pub struct HIL_OPTICAL_FLOW_DATA {
22881    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22882    pub time_usec: u64,
22883    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22884    pub integration_time_us: u32,
22885    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22886    pub integrated_x: f32,
22887    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22888    pub integrated_y: f32,
22889    #[doc = "RH rotation around X axis"]
22890    pub integrated_xgyro: f32,
22891    #[doc = "RH rotation around Y axis"]
22892    pub integrated_ygyro: f32,
22893    #[doc = "RH rotation around Z axis"]
22894    pub integrated_zgyro: f32,
22895    #[doc = "Time since the distance was sampled."]
22896    pub time_delta_distance_us: u32,
22897    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22898    pub distance: f32,
22899    #[doc = "Temperature"]
22900    pub temperature: i16,
22901    #[doc = "Sensor ID"]
22902    pub sensor_id: u8,
22903    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22904    pub quality: u8,
22905}
22906impl HIL_OPTICAL_FLOW_DATA {
22907    pub const ENCODED_LEN: usize = 44usize;
22908    pub const DEFAULT: Self = Self {
22909        time_usec: 0_u64,
22910        integration_time_us: 0_u32,
22911        integrated_x: 0.0_f32,
22912        integrated_y: 0.0_f32,
22913        integrated_xgyro: 0.0_f32,
22914        integrated_ygyro: 0.0_f32,
22915        integrated_zgyro: 0.0_f32,
22916        time_delta_distance_us: 0_u32,
22917        distance: 0.0_f32,
22918        temperature: 0_i16,
22919        sensor_id: 0_u8,
22920        quality: 0_u8,
22921    };
22922    #[cfg(feature = "arbitrary")]
22923    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22924        use arbitrary::{Arbitrary, Unstructured};
22925        let mut buf = [0u8; 1024];
22926        rng.fill_bytes(&mut buf);
22927        let mut unstructured = Unstructured::new(&buf);
22928        Self::arbitrary(&mut unstructured).unwrap_or_default()
22929    }
22930}
22931impl Default for HIL_OPTICAL_FLOW_DATA {
22932    fn default() -> Self {
22933        Self::DEFAULT.clone()
22934    }
22935}
22936impl MessageData for HIL_OPTICAL_FLOW_DATA {
22937    type Message = MavMessage;
22938    const ID: u32 = 114u32;
22939    const NAME: &'static str = "HIL_OPTICAL_FLOW";
22940    const EXTRA_CRC: u8 = 237u8;
22941    const ENCODED_LEN: usize = 44usize;
22942    fn deser(
22943        _version: MavlinkVersion,
22944        __input: &[u8],
22945    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22946        let avail_len = __input.len();
22947        let mut payload_buf = [0; Self::ENCODED_LEN];
22948        let mut buf = if avail_len < Self::ENCODED_LEN {
22949            payload_buf[0..avail_len].copy_from_slice(__input);
22950            Bytes::new(&payload_buf)
22951        } else {
22952            Bytes::new(__input)
22953        };
22954        let mut __struct = Self::default();
22955        __struct.time_usec = buf.get_u64_le()?;
22956        __struct.integration_time_us = buf.get_u32_le()?;
22957        __struct.integrated_x = buf.get_f32_le()?;
22958        __struct.integrated_y = buf.get_f32_le()?;
22959        __struct.integrated_xgyro = buf.get_f32_le()?;
22960        __struct.integrated_ygyro = buf.get_f32_le()?;
22961        __struct.integrated_zgyro = buf.get_f32_le()?;
22962        __struct.time_delta_distance_us = buf.get_u32_le()?;
22963        __struct.distance = buf.get_f32_le()?;
22964        __struct.temperature = buf.get_i16_le()?;
22965        __struct.sensor_id = buf.get_u8()?;
22966        __struct.quality = buf.get_u8()?;
22967        Ok(__struct)
22968    }
22969    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22970        let mut __tmp = BytesMut::new(bytes);
22971        #[allow(clippy::absurd_extreme_comparisons)]
22972        #[allow(unused_comparisons)]
22973        if __tmp.remaining() < Self::ENCODED_LEN {
22974            panic!(
22975                "buffer is too small (need {} bytes, but got {})",
22976                Self::ENCODED_LEN,
22977                __tmp.remaining(),
22978            )
22979        }
22980        __tmp.put_u64_le(self.time_usec);
22981        __tmp.put_u32_le(self.integration_time_us);
22982        __tmp.put_f32_le(self.integrated_x);
22983        __tmp.put_f32_le(self.integrated_y);
22984        __tmp.put_f32_le(self.integrated_xgyro);
22985        __tmp.put_f32_le(self.integrated_ygyro);
22986        __tmp.put_f32_le(self.integrated_zgyro);
22987        __tmp.put_u32_le(self.time_delta_distance_us);
22988        __tmp.put_f32_le(self.distance);
22989        __tmp.put_i16_le(self.temperature);
22990        __tmp.put_u8(self.sensor_id);
22991        __tmp.put_u8(self.quality);
22992        if matches!(version, MavlinkVersion::V2) {
22993            let len = __tmp.len();
22994            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22995        } else {
22996            __tmp.len()
22997        }
22998    }
22999}
23000#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
23001#[doc = ""]
23002#[doc = "ID: 92"]
23003#[derive(Debug, Clone, PartialEq)]
23004#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23006#[cfg_attr(feature = "ts", derive(TS))]
23007#[cfg_attr(feature = "ts", ts(export))]
23008pub struct HIL_RC_INPUTS_RAW_DATA {
23009    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23010    pub time_usec: u64,
23011    #[doc = "RC channel 1 value"]
23012    pub chan1_raw: u16,
23013    #[doc = "RC channel 2 value"]
23014    pub chan2_raw: u16,
23015    #[doc = "RC channel 3 value"]
23016    pub chan3_raw: u16,
23017    #[doc = "RC channel 4 value"]
23018    pub chan4_raw: u16,
23019    #[doc = "RC channel 5 value"]
23020    pub chan5_raw: u16,
23021    #[doc = "RC channel 6 value"]
23022    pub chan6_raw: u16,
23023    #[doc = "RC channel 7 value"]
23024    pub chan7_raw: u16,
23025    #[doc = "RC channel 8 value"]
23026    pub chan8_raw: u16,
23027    #[doc = "RC channel 9 value"]
23028    pub chan9_raw: u16,
23029    #[doc = "RC channel 10 value"]
23030    pub chan10_raw: u16,
23031    #[doc = "RC channel 11 value"]
23032    pub chan11_raw: u16,
23033    #[doc = "RC channel 12 value"]
23034    pub chan12_raw: u16,
23035    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
23036    pub rssi: u8,
23037}
23038impl HIL_RC_INPUTS_RAW_DATA {
23039    pub const ENCODED_LEN: usize = 33usize;
23040    pub const DEFAULT: Self = Self {
23041        time_usec: 0_u64,
23042        chan1_raw: 0_u16,
23043        chan2_raw: 0_u16,
23044        chan3_raw: 0_u16,
23045        chan4_raw: 0_u16,
23046        chan5_raw: 0_u16,
23047        chan6_raw: 0_u16,
23048        chan7_raw: 0_u16,
23049        chan8_raw: 0_u16,
23050        chan9_raw: 0_u16,
23051        chan10_raw: 0_u16,
23052        chan11_raw: 0_u16,
23053        chan12_raw: 0_u16,
23054        rssi: 0_u8,
23055    };
23056    #[cfg(feature = "arbitrary")]
23057    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23058        use arbitrary::{Arbitrary, Unstructured};
23059        let mut buf = [0u8; 1024];
23060        rng.fill_bytes(&mut buf);
23061        let mut unstructured = Unstructured::new(&buf);
23062        Self::arbitrary(&mut unstructured).unwrap_or_default()
23063    }
23064}
23065impl Default for HIL_RC_INPUTS_RAW_DATA {
23066    fn default() -> Self {
23067        Self::DEFAULT.clone()
23068    }
23069}
23070impl MessageData for HIL_RC_INPUTS_RAW_DATA {
23071    type Message = MavMessage;
23072    const ID: u32 = 92u32;
23073    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
23074    const EXTRA_CRC: u8 = 54u8;
23075    const ENCODED_LEN: usize = 33usize;
23076    fn deser(
23077        _version: MavlinkVersion,
23078        __input: &[u8],
23079    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23080        let avail_len = __input.len();
23081        let mut payload_buf = [0; Self::ENCODED_LEN];
23082        let mut buf = if avail_len < Self::ENCODED_LEN {
23083            payload_buf[0..avail_len].copy_from_slice(__input);
23084            Bytes::new(&payload_buf)
23085        } else {
23086            Bytes::new(__input)
23087        };
23088        let mut __struct = Self::default();
23089        __struct.time_usec = buf.get_u64_le()?;
23090        __struct.chan1_raw = buf.get_u16_le()?;
23091        __struct.chan2_raw = buf.get_u16_le()?;
23092        __struct.chan3_raw = buf.get_u16_le()?;
23093        __struct.chan4_raw = buf.get_u16_le()?;
23094        __struct.chan5_raw = buf.get_u16_le()?;
23095        __struct.chan6_raw = buf.get_u16_le()?;
23096        __struct.chan7_raw = buf.get_u16_le()?;
23097        __struct.chan8_raw = buf.get_u16_le()?;
23098        __struct.chan9_raw = buf.get_u16_le()?;
23099        __struct.chan10_raw = buf.get_u16_le()?;
23100        __struct.chan11_raw = buf.get_u16_le()?;
23101        __struct.chan12_raw = buf.get_u16_le()?;
23102        __struct.rssi = buf.get_u8()?;
23103        Ok(__struct)
23104    }
23105    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23106        let mut __tmp = BytesMut::new(bytes);
23107        #[allow(clippy::absurd_extreme_comparisons)]
23108        #[allow(unused_comparisons)]
23109        if __tmp.remaining() < Self::ENCODED_LEN {
23110            panic!(
23111                "buffer is too small (need {} bytes, but got {})",
23112                Self::ENCODED_LEN,
23113                __tmp.remaining(),
23114            )
23115        }
23116        __tmp.put_u64_le(self.time_usec);
23117        __tmp.put_u16_le(self.chan1_raw);
23118        __tmp.put_u16_le(self.chan2_raw);
23119        __tmp.put_u16_le(self.chan3_raw);
23120        __tmp.put_u16_le(self.chan4_raw);
23121        __tmp.put_u16_le(self.chan5_raw);
23122        __tmp.put_u16_le(self.chan6_raw);
23123        __tmp.put_u16_le(self.chan7_raw);
23124        __tmp.put_u16_le(self.chan8_raw);
23125        __tmp.put_u16_le(self.chan9_raw);
23126        __tmp.put_u16_le(self.chan10_raw);
23127        __tmp.put_u16_le(self.chan11_raw);
23128        __tmp.put_u16_le(self.chan12_raw);
23129        __tmp.put_u8(self.rssi);
23130        if matches!(version, MavlinkVersion::V2) {
23131            let len = __tmp.len();
23132            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23133        } else {
23134            __tmp.len()
23135        }
23136    }
23137}
23138#[doc = "The IMU readings in SI units in NED body frame."]
23139#[doc = ""]
23140#[doc = "ID: 107"]
23141#[derive(Debug, Clone, PartialEq)]
23142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23144#[cfg_attr(feature = "ts", derive(TS))]
23145#[cfg_attr(feature = "ts", ts(export))]
23146pub struct HIL_SENSOR_DATA {
23147    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23148    pub time_usec: u64,
23149    #[doc = "X acceleration"]
23150    pub xacc: f32,
23151    #[doc = "Y acceleration"]
23152    pub yacc: f32,
23153    #[doc = "Z acceleration"]
23154    pub zacc: f32,
23155    #[doc = "Angular speed around X axis in body frame"]
23156    pub xgyro: f32,
23157    #[doc = "Angular speed around Y axis in body frame"]
23158    pub ygyro: f32,
23159    #[doc = "Angular speed around Z axis in body frame"]
23160    pub zgyro: f32,
23161    #[doc = "X Magnetic field"]
23162    pub xmag: f32,
23163    #[doc = "Y Magnetic field"]
23164    pub ymag: f32,
23165    #[doc = "Z Magnetic field"]
23166    pub zmag: f32,
23167    #[doc = "Absolute pressure"]
23168    pub abs_pressure: f32,
23169    #[doc = "Differential pressure (airspeed)"]
23170    pub diff_pressure: f32,
23171    #[doc = "Altitude calculated from pressure"]
23172    pub pressure_alt: f32,
23173    #[doc = "Temperature"]
23174    pub temperature: f32,
23175    #[doc = "Bitmap for fields that have updated since last message"]
23176    pub fields_updated: HilSensorUpdatedFlags,
23177    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
23178    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23179    pub id: u8,
23180}
23181impl HIL_SENSOR_DATA {
23182    pub const ENCODED_LEN: usize = 65usize;
23183    pub const DEFAULT: Self = Self {
23184        time_usec: 0_u64,
23185        xacc: 0.0_f32,
23186        yacc: 0.0_f32,
23187        zacc: 0.0_f32,
23188        xgyro: 0.0_f32,
23189        ygyro: 0.0_f32,
23190        zgyro: 0.0_f32,
23191        xmag: 0.0_f32,
23192        ymag: 0.0_f32,
23193        zmag: 0.0_f32,
23194        abs_pressure: 0.0_f32,
23195        diff_pressure: 0.0_f32,
23196        pressure_alt: 0.0_f32,
23197        temperature: 0.0_f32,
23198        fields_updated: HilSensorUpdatedFlags::DEFAULT,
23199        id: 0_u8,
23200    };
23201    #[cfg(feature = "arbitrary")]
23202    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23203        use arbitrary::{Arbitrary, Unstructured};
23204        let mut buf = [0u8; 1024];
23205        rng.fill_bytes(&mut buf);
23206        let mut unstructured = Unstructured::new(&buf);
23207        Self::arbitrary(&mut unstructured).unwrap_or_default()
23208    }
23209}
23210impl Default for HIL_SENSOR_DATA {
23211    fn default() -> Self {
23212        Self::DEFAULT.clone()
23213    }
23214}
23215impl MessageData for HIL_SENSOR_DATA {
23216    type Message = MavMessage;
23217    const ID: u32 = 107u32;
23218    const NAME: &'static str = "HIL_SENSOR";
23219    const EXTRA_CRC: u8 = 108u8;
23220    const ENCODED_LEN: usize = 65usize;
23221    fn deser(
23222        _version: MavlinkVersion,
23223        __input: &[u8],
23224    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23225        let avail_len = __input.len();
23226        let mut payload_buf = [0; Self::ENCODED_LEN];
23227        let mut buf = if avail_len < Self::ENCODED_LEN {
23228            payload_buf[0..avail_len].copy_from_slice(__input);
23229            Bytes::new(&payload_buf)
23230        } else {
23231            Bytes::new(__input)
23232        };
23233        let mut __struct = Self::default();
23234        __struct.time_usec = buf.get_u64_le()?;
23235        __struct.xacc = buf.get_f32_le()?;
23236        __struct.yacc = buf.get_f32_le()?;
23237        __struct.zacc = buf.get_f32_le()?;
23238        __struct.xgyro = buf.get_f32_le()?;
23239        __struct.ygyro = buf.get_f32_le()?;
23240        __struct.zgyro = buf.get_f32_le()?;
23241        __struct.xmag = buf.get_f32_le()?;
23242        __struct.ymag = buf.get_f32_le()?;
23243        __struct.zmag = buf.get_f32_le()?;
23244        __struct.abs_pressure = buf.get_f32_le()?;
23245        __struct.diff_pressure = buf.get_f32_le()?;
23246        __struct.pressure_alt = buf.get_f32_le()?;
23247        __struct.temperature = buf.get_f32_le()?;
23248        let tmp = buf.get_u32_le()?;
23249        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
23250            tmp as <HilSensorUpdatedFlags as Flags>::Bits,
23251        )
23252        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23253            flag_type: "HilSensorUpdatedFlags",
23254            value: tmp as u64,
23255        })?;
23256        __struct.id = buf.get_u8()?;
23257        Ok(__struct)
23258    }
23259    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23260        let mut __tmp = BytesMut::new(bytes);
23261        #[allow(clippy::absurd_extreme_comparisons)]
23262        #[allow(unused_comparisons)]
23263        if __tmp.remaining() < Self::ENCODED_LEN {
23264            panic!(
23265                "buffer is too small (need {} bytes, but got {})",
23266                Self::ENCODED_LEN,
23267                __tmp.remaining(),
23268            )
23269        }
23270        __tmp.put_u64_le(self.time_usec);
23271        __tmp.put_f32_le(self.xacc);
23272        __tmp.put_f32_le(self.yacc);
23273        __tmp.put_f32_le(self.zacc);
23274        __tmp.put_f32_le(self.xgyro);
23275        __tmp.put_f32_le(self.ygyro);
23276        __tmp.put_f32_le(self.zgyro);
23277        __tmp.put_f32_le(self.xmag);
23278        __tmp.put_f32_le(self.ymag);
23279        __tmp.put_f32_le(self.zmag);
23280        __tmp.put_f32_le(self.abs_pressure);
23281        __tmp.put_f32_le(self.diff_pressure);
23282        __tmp.put_f32_le(self.pressure_alt);
23283        __tmp.put_f32_le(self.temperature);
23284        __tmp.put_u32_le(self.fields_updated.bits() as u32);
23285        if matches!(version, MavlinkVersion::V2) {
23286            __tmp.put_u8(self.id);
23287            let len = __tmp.len();
23288            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23289        } else {
23290            __tmp.len()
23291        }
23292    }
23293}
23294#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
23295#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
23296#[doc = ""]
23297#[doc = "ID: 90"]
23298#[derive(Debug, Clone, PartialEq)]
23299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23301#[cfg_attr(feature = "ts", derive(TS))]
23302#[cfg_attr(feature = "ts", ts(export))]
23303pub struct HIL_STATE_DATA {
23304    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23305    pub time_usec: u64,
23306    #[doc = "Roll angle"]
23307    pub roll: f32,
23308    #[doc = "Pitch angle"]
23309    pub pitch: f32,
23310    #[doc = "Yaw angle"]
23311    pub yaw: f32,
23312    #[doc = "Body frame roll / phi angular speed"]
23313    pub rollspeed: f32,
23314    #[doc = "Body frame pitch / theta angular speed"]
23315    pub pitchspeed: f32,
23316    #[doc = "Body frame yaw / psi angular speed"]
23317    pub yawspeed: f32,
23318    #[doc = "Latitude"]
23319    pub lat: i32,
23320    #[doc = "Longitude"]
23321    pub lon: i32,
23322    #[doc = "Altitude"]
23323    pub alt: i32,
23324    #[doc = "Ground X Speed (Latitude)"]
23325    pub vx: i16,
23326    #[doc = "Ground Y Speed (Longitude)"]
23327    pub vy: i16,
23328    #[doc = "Ground Z Speed (Altitude)"]
23329    pub vz: i16,
23330    #[doc = "X acceleration"]
23331    pub xacc: i16,
23332    #[doc = "Y acceleration"]
23333    pub yacc: i16,
23334    #[doc = "Z acceleration"]
23335    pub zacc: i16,
23336}
23337impl HIL_STATE_DATA {
23338    pub const ENCODED_LEN: usize = 56usize;
23339    pub const DEFAULT: Self = Self {
23340        time_usec: 0_u64,
23341        roll: 0.0_f32,
23342        pitch: 0.0_f32,
23343        yaw: 0.0_f32,
23344        rollspeed: 0.0_f32,
23345        pitchspeed: 0.0_f32,
23346        yawspeed: 0.0_f32,
23347        lat: 0_i32,
23348        lon: 0_i32,
23349        alt: 0_i32,
23350        vx: 0_i16,
23351        vy: 0_i16,
23352        vz: 0_i16,
23353        xacc: 0_i16,
23354        yacc: 0_i16,
23355        zacc: 0_i16,
23356    };
23357    #[cfg(feature = "arbitrary")]
23358    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23359        use arbitrary::{Arbitrary, Unstructured};
23360        let mut buf = [0u8; 1024];
23361        rng.fill_bytes(&mut buf);
23362        let mut unstructured = Unstructured::new(&buf);
23363        Self::arbitrary(&mut unstructured).unwrap_or_default()
23364    }
23365}
23366impl Default for HIL_STATE_DATA {
23367    fn default() -> Self {
23368        Self::DEFAULT.clone()
23369    }
23370}
23371impl MessageData for HIL_STATE_DATA {
23372    type Message = MavMessage;
23373    const ID: u32 = 90u32;
23374    const NAME: &'static str = "HIL_STATE";
23375    const EXTRA_CRC: u8 = 183u8;
23376    const ENCODED_LEN: usize = 56usize;
23377    fn deser(
23378        _version: MavlinkVersion,
23379        __input: &[u8],
23380    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23381        let avail_len = __input.len();
23382        let mut payload_buf = [0; Self::ENCODED_LEN];
23383        let mut buf = if avail_len < Self::ENCODED_LEN {
23384            payload_buf[0..avail_len].copy_from_slice(__input);
23385            Bytes::new(&payload_buf)
23386        } else {
23387            Bytes::new(__input)
23388        };
23389        let mut __struct = Self::default();
23390        __struct.time_usec = buf.get_u64_le()?;
23391        __struct.roll = buf.get_f32_le()?;
23392        __struct.pitch = buf.get_f32_le()?;
23393        __struct.yaw = buf.get_f32_le()?;
23394        __struct.rollspeed = buf.get_f32_le()?;
23395        __struct.pitchspeed = buf.get_f32_le()?;
23396        __struct.yawspeed = buf.get_f32_le()?;
23397        __struct.lat = buf.get_i32_le()?;
23398        __struct.lon = buf.get_i32_le()?;
23399        __struct.alt = buf.get_i32_le()?;
23400        __struct.vx = buf.get_i16_le()?;
23401        __struct.vy = buf.get_i16_le()?;
23402        __struct.vz = buf.get_i16_le()?;
23403        __struct.xacc = buf.get_i16_le()?;
23404        __struct.yacc = buf.get_i16_le()?;
23405        __struct.zacc = buf.get_i16_le()?;
23406        Ok(__struct)
23407    }
23408    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23409        let mut __tmp = BytesMut::new(bytes);
23410        #[allow(clippy::absurd_extreme_comparisons)]
23411        #[allow(unused_comparisons)]
23412        if __tmp.remaining() < Self::ENCODED_LEN {
23413            panic!(
23414                "buffer is too small (need {} bytes, but got {})",
23415                Self::ENCODED_LEN,
23416                __tmp.remaining(),
23417            )
23418        }
23419        __tmp.put_u64_le(self.time_usec);
23420        __tmp.put_f32_le(self.roll);
23421        __tmp.put_f32_le(self.pitch);
23422        __tmp.put_f32_le(self.yaw);
23423        __tmp.put_f32_le(self.rollspeed);
23424        __tmp.put_f32_le(self.pitchspeed);
23425        __tmp.put_f32_le(self.yawspeed);
23426        __tmp.put_i32_le(self.lat);
23427        __tmp.put_i32_le(self.lon);
23428        __tmp.put_i32_le(self.alt);
23429        __tmp.put_i16_le(self.vx);
23430        __tmp.put_i16_le(self.vy);
23431        __tmp.put_i16_le(self.vz);
23432        __tmp.put_i16_le(self.xacc);
23433        __tmp.put_i16_le(self.yacc);
23434        __tmp.put_i16_le(self.zacc);
23435        if matches!(version, MavlinkVersion::V2) {
23436            let len = __tmp.len();
23437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23438        } else {
23439            __tmp.len()
23440        }
23441    }
23442}
23443#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
23444#[doc = ""]
23445#[doc = "ID: 115"]
23446#[derive(Debug, Clone, PartialEq)]
23447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23449#[cfg_attr(feature = "ts", derive(TS))]
23450#[cfg_attr(feature = "ts", ts(export))]
23451pub struct HIL_STATE_QUATERNION_DATA {
23452    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23453    pub time_usec: u64,
23454    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
23455    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23456    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23457    pub attitude_quaternion: [f32; 4],
23458    #[doc = "Body frame roll / phi angular speed"]
23459    pub rollspeed: f32,
23460    #[doc = "Body frame pitch / theta angular speed"]
23461    pub pitchspeed: f32,
23462    #[doc = "Body frame yaw / psi angular speed"]
23463    pub yawspeed: f32,
23464    #[doc = "Latitude"]
23465    pub lat: i32,
23466    #[doc = "Longitude"]
23467    pub lon: i32,
23468    #[doc = "Altitude"]
23469    pub alt: i32,
23470    #[doc = "Ground X Speed (Latitude)"]
23471    pub vx: i16,
23472    #[doc = "Ground Y Speed (Longitude)"]
23473    pub vy: i16,
23474    #[doc = "Ground Z Speed (Altitude)"]
23475    pub vz: i16,
23476    #[doc = "Indicated airspeed"]
23477    pub ind_airspeed: u16,
23478    #[doc = "True airspeed"]
23479    pub true_airspeed: u16,
23480    #[doc = "X acceleration"]
23481    pub xacc: i16,
23482    #[doc = "Y acceleration"]
23483    pub yacc: i16,
23484    #[doc = "Z acceleration"]
23485    pub zacc: i16,
23486}
23487impl HIL_STATE_QUATERNION_DATA {
23488    pub const ENCODED_LEN: usize = 64usize;
23489    pub const DEFAULT: Self = Self {
23490        time_usec: 0_u64,
23491        attitude_quaternion: [0.0_f32; 4usize],
23492        rollspeed: 0.0_f32,
23493        pitchspeed: 0.0_f32,
23494        yawspeed: 0.0_f32,
23495        lat: 0_i32,
23496        lon: 0_i32,
23497        alt: 0_i32,
23498        vx: 0_i16,
23499        vy: 0_i16,
23500        vz: 0_i16,
23501        ind_airspeed: 0_u16,
23502        true_airspeed: 0_u16,
23503        xacc: 0_i16,
23504        yacc: 0_i16,
23505        zacc: 0_i16,
23506    };
23507    #[cfg(feature = "arbitrary")]
23508    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23509        use arbitrary::{Arbitrary, Unstructured};
23510        let mut buf = [0u8; 1024];
23511        rng.fill_bytes(&mut buf);
23512        let mut unstructured = Unstructured::new(&buf);
23513        Self::arbitrary(&mut unstructured).unwrap_or_default()
23514    }
23515}
23516impl Default for HIL_STATE_QUATERNION_DATA {
23517    fn default() -> Self {
23518        Self::DEFAULT.clone()
23519    }
23520}
23521impl MessageData for HIL_STATE_QUATERNION_DATA {
23522    type Message = MavMessage;
23523    const ID: u32 = 115u32;
23524    const NAME: &'static str = "HIL_STATE_QUATERNION";
23525    const EXTRA_CRC: u8 = 4u8;
23526    const ENCODED_LEN: usize = 64usize;
23527    fn deser(
23528        _version: MavlinkVersion,
23529        __input: &[u8],
23530    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23531        let avail_len = __input.len();
23532        let mut payload_buf = [0; Self::ENCODED_LEN];
23533        let mut buf = if avail_len < Self::ENCODED_LEN {
23534            payload_buf[0..avail_len].copy_from_slice(__input);
23535            Bytes::new(&payload_buf)
23536        } else {
23537            Bytes::new(__input)
23538        };
23539        let mut __struct = Self::default();
23540        __struct.time_usec = buf.get_u64_le()?;
23541        for v in &mut __struct.attitude_quaternion {
23542            let val = buf.get_f32_le()?;
23543            *v = val;
23544        }
23545        __struct.rollspeed = buf.get_f32_le()?;
23546        __struct.pitchspeed = buf.get_f32_le()?;
23547        __struct.yawspeed = buf.get_f32_le()?;
23548        __struct.lat = buf.get_i32_le()?;
23549        __struct.lon = buf.get_i32_le()?;
23550        __struct.alt = buf.get_i32_le()?;
23551        __struct.vx = buf.get_i16_le()?;
23552        __struct.vy = buf.get_i16_le()?;
23553        __struct.vz = buf.get_i16_le()?;
23554        __struct.ind_airspeed = buf.get_u16_le()?;
23555        __struct.true_airspeed = buf.get_u16_le()?;
23556        __struct.xacc = buf.get_i16_le()?;
23557        __struct.yacc = buf.get_i16_le()?;
23558        __struct.zacc = buf.get_i16_le()?;
23559        Ok(__struct)
23560    }
23561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23562        let mut __tmp = BytesMut::new(bytes);
23563        #[allow(clippy::absurd_extreme_comparisons)]
23564        #[allow(unused_comparisons)]
23565        if __tmp.remaining() < Self::ENCODED_LEN {
23566            panic!(
23567                "buffer is too small (need {} bytes, but got {})",
23568                Self::ENCODED_LEN,
23569                __tmp.remaining(),
23570            )
23571        }
23572        __tmp.put_u64_le(self.time_usec);
23573        for val in &self.attitude_quaternion {
23574            __tmp.put_f32_le(*val);
23575        }
23576        __tmp.put_f32_le(self.rollspeed);
23577        __tmp.put_f32_le(self.pitchspeed);
23578        __tmp.put_f32_le(self.yawspeed);
23579        __tmp.put_i32_le(self.lat);
23580        __tmp.put_i32_le(self.lon);
23581        __tmp.put_i32_le(self.alt);
23582        __tmp.put_i16_le(self.vx);
23583        __tmp.put_i16_le(self.vy);
23584        __tmp.put_i16_le(self.vz);
23585        __tmp.put_u16_le(self.ind_airspeed);
23586        __tmp.put_u16_le(self.true_airspeed);
23587        __tmp.put_i16_le(self.xacc);
23588        __tmp.put_i16_le(self.yacc);
23589        __tmp.put_i16_le(self.zacc);
23590        if matches!(version, MavlinkVersion::V2) {
23591            let len = __tmp.len();
23592            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23593        } else {
23594            __tmp.len()
23595        }
23596    }
23597}
23598#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
23599#[doc = ""]
23600#[doc = "ID: 242"]
23601#[derive(Debug, Clone, PartialEq)]
23602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23604#[cfg_attr(feature = "ts", derive(TS))]
23605#[cfg_attr(feature = "ts", ts(export))]
23606pub struct HOME_POSITION_DATA {
23607    #[doc = "Latitude (WGS84)"]
23608    pub latitude: i32,
23609    #[doc = "Longitude (WGS84)"]
23610    pub longitude: i32,
23611    #[doc = "Altitude (MSL). Positive for up."]
23612    pub altitude: i32,
23613    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
23614    pub x: f32,
23615    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
23616    pub y: f32,
23617    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
23618    pub z: f32,
23619    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
23620    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23621    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23622    pub q: [f32; 4],
23623    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
23624    pub approach_x: f32,
23625    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
23626    pub approach_y: f32,
23627    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
23628    pub approach_z: f32,
23629    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23630    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23631    pub time_usec: u64,
23632}
23633impl HOME_POSITION_DATA {
23634    pub const ENCODED_LEN: usize = 60usize;
23635    pub const DEFAULT: Self = Self {
23636        latitude: 0_i32,
23637        longitude: 0_i32,
23638        altitude: 0_i32,
23639        x: 0.0_f32,
23640        y: 0.0_f32,
23641        z: 0.0_f32,
23642        q: [0.0_f32; 4usize],
23643        approach_x: 0.0_f32,
23644        approach_y: 0.0_f32,
23645        approach_z: 0.0_f32,
23646        time_usec: 0_u64,
23647    };
23648    #[cfg(feature = "arbitrary")]
23649    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23650        use arbitrary::{Arbitrary, Unstructured};
23651        let mut buf = [0u8; 1024];
23652        rng.fill_bytes(&mut buf);
23653        let mut unstructured = Unstructured::new(&buf);
23654        Self::arbitrary(&mut unstructured).unwrap_or_default()
23655    }
23656}
23657impl Default for HOME_POSITION_DATA {
23658    fn default() -> Self {
23659        Self::DEFAULT.clone()
23660    }
23661}
23662impl MessageData for HOME_POSITION_DATA {
23663    type Message = MavMessage;
23664    const ID: u32 = 242u32;
23665    const NAME: &'static str = "HOME_POSITION";
23666    const EXTRA_CRC: u8 = 104u8;
23667    const ENCODED_LEN: usize = 60usize;
23668    fn deser(
23669        _version: MavlinkVersion,
23670        __input: &[u8],
23671    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23672        let avail_len = __input.len();
23673        let mut payload_buf = [0; Self::ENCODED_LEN];
23674        let mut buf = if avail_len < Self::ENCODED_LEN {
23675            payload_buf[0..avail_len].copy_from_slice(__input);
23676            Bytes::new(&payload_buf)
23677        } else {
23678            Bytes::new(__input)
23679        };
23680        let mut __struct = Self::default();
23681        __struct.latitude = buf.get_i32_le()?;
23682        __struct.longitude = buf.get_i32_le()?;
23683        __struct.altitude = buf.get_i32_le()?;
23684        __struct.x = buf.get_f32_le()?;
23685        __struct.y = buf.get_f32_le()?;
23686        __struct.z = buf.get_f32_le()?;
23687        for v in &mut __struct.q {
23688            let val = buf.get_f32_le()?;
23689            *v = val;
23690        }
23691        __struct.approach_x = buf.get_f32_le()?;
23692        __struct.approach_y = buf.get_f32_le()?;
23693        __struct.approach_z = buf.get_f32_le()?;
23694        __struct.time_usec = buf.get_u64_le()?;
23695        Ok(__struct)
23696    }
23697    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23698        let mut __tmp = BytesMut::new(bytes);
23699        #[allow(clippy::absurd_extreme_comparisons)]
23700        #[allow(unused_comparisons)]
23701        if __tmp.remaining() < Self::ENCODED_LEN {
23702            panic!(
23703                "buffer is too small (need {} bytes, but got {})",
23704                Self::ENCODED_LEN,
23705                __tmp.remaining(),
23706            )
23707        }
23708        __tmp.put_i32_le(self.latitude);
23709        __tmp.put_i32_le(self.longitude);
23710        __tmp.put_i32_le(self.altitude);
23711        __tmp.put_f32_le(self.x);
23712        __tmp.put_f32_le(self.y);
23713        __tmp.put_f32_le(self.z);
23714        for val in &self.q {
23715            __tmp.put_f32_le(*val);
23716        }
23717        __tmp.put_f32_le(self.approach_x);
23718        __tmp.put_f32_le(self.approach_y);
23719        __tmp.put_f32_le(self.approach_z);
23720        if matches!(version, MavlinkVersion::V2) {
23721            __tmp.put_u64_le(self.time_usec);
23722            let len = __tmp.len();
23723            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23724        } else {
23725            __tmp.len()
23726        }
23727    }
23728}
23729#[doc = "Status of key hardware."]
23730#[doc = ""]
23731#[doc = "ID: 165"]
23732#[derive(Debug, Clone, PartialEq)]
23733#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23734#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23735#[cfg_attr(feature = "ts", derive(TS))]
23736#[cfg_attr(feature = "ts", ts(export))]
23737pub struct HWSTATUS_DATA {
23738    #[doc = "Board voltage."]
23739    pub Vcc: u16,
23740    #[doc = "I2C error count."]
23741    pub I2Cerr: u8,
23742}
23743impl HWSTATUS_DATA {
23744    pub const ENCODED_LEN: usize = 3usize;
23745    pub const DEFAULT: Self = Self {
23746        Vcc: 0_u16,
23747        I2Cerr: 0_u8,
23748    };
23749    #[cfg(feature = "arbitrary")]
23750    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23751        use arbitrary::{Arbitrary, Unstructured};
23752        let mut buf = [0u8; 1024];
23753        rng.fill_bytes(&mut buf);
23754        let mut unstructured = Unstructured::new(&buf);
23755        Self::arbitrary(&mut unstructured).unwrap_or_default()
23756    }
23757}
23758impl Default for HWSTATUS_DATA {
23759    fn default() -> Self {
23760        Self::DEFAULT.clone()
23761    }
23762}
23763impl MessageData for HWSTATUS_DATA {
23764    type Message = MavMessage;
23765    const ID: u32 = 165u32;
23766    const NAME: &'static str = "HWSTATUS";
23767    const EXTRA_CRC: u8 = 21u8;
23768    const ENCODED_LEN: usize = 3usize;
23769    fn deser(
23770        _version: MavlinkVersion,
23771        __input: &[u8],
23772    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23773        let avail_len = __input.len();
23774        let mut payload_buf = [0; Self::ENCODED_LEN];
23775        let mut buf = if avail_len < Self::ENCODED_LEN {
23776            payload_buf[0..avail_len].copy_from_slice(__input);
23777            Bytes::new(&payload_buf)
23778        } else {
23779            Bytes::new(__input)
23780        };
23781        let mut __struct = Self::default();
23782        __struct.Vcc = buf.get_u16_le()?;
23783        __struct.I2Cerr = buf.get_u8()?;
23784        Ok(__struct)
23785    }
23786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23787        let mut __tmp = BytesMut::new(bytes);
23788        #[allow(clippy::absurd_extreme_comparisons)]
23789        #[allow(unused_comparisons)]
23790        if __tmp.remaining() < Self::ENCODED_LEN {
23791            panic!(
23792                "buffer is too small (need {} bytes, but got {})",
23793                Self::ENCODED_LEN,
23794                __tmp.remaining(),
23795            )
23796        }
23797        __tmp.put_u16_le(self.Vcc);
23798        __tmp.put_u8(self.I2Cerr);
23799        if matches!(version, MavlinkVersion::V2) {
23800            let len = __tmp.len();
23801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23802        } else {
23803            __tmp.len()
23804        }
23805    }
23806}
23807#[doc = "Temperature and humidity from hygrometer."]
23808#[doc = ""]
23809#[doc = "ID: 12920"]
23810#[derive(Debug, Clone, PartialEq)]
23811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23813#[cfg_attr(feature = "ts", derive(TS))]
23814#[cfg_attr(feature = "ts", ts(export))]
23815pub struct HYGROMETER_SENSOR_DATA {
23816    #[doc = "Temperature"]
23817    pub temperature: i16,
23818    #[doc = "Humidity"]
23819    pub humidity: u16,
23820    #[doc = "Hygrometer ID"]
23821    pub id: u8,
23822}
23823impl HYGROMETER_SENSOR_DATA {
23824    pub const ENCODED_LEN: usize = 5usize;
23825    pub const DEFAULT: Self = Self {
23826        temperature: 0_i16,
23827        humidity: 0_u16,
23828        id: 0_u8,
23829    };
23830    #[cfg(feature = "arbitrary")]
23831    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23832        use arbitrary::{Arbitrary, Unstructured};
23833        let mut buf = [0u8; 1024];
23834        rng.fill_bytes(&mut buf);
23835        let mut unstructured = Unstructured::new(&buf);
23836        Self::arbitrary(&mut unstructured).unwrap_or_default()
23837    }
23838}
23839impl Default for HYGROMETER_SENSOR_DATA {
23840    fn default() -> Self {
23841        Self::DEFAULT.clone()
23842    }
23843}
23844impl MessageData for HYGROMETER_SENSOR_DATA {
23845    type Message = MavMessage;
23846    const ID: u32 = 12920u32;
23847    const NAME: &'static str = "HYGROMETER_SENSOR";
23848    const EXTRA_CRC: u8 = 20u8;
23849    const ENCODED_LEN: usize = 5usize;
23850    fn deser(
23851        _version: MavlinkVersion,
23852        __input: &[u8],
23853    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23854        let avail_len = __input.len();
23855        let mut payload_buf = [0; Self::ENCODED_LEN];
23856        let mut buf = if avail_len < Self::ENCODED_LEN {
23857            payload_buf[0..avail_len].copy_from_slice(__input);
23858            Bytes::new(&payload_buf)
23859        } else {
23860            Bytes::new(__input)
23861        };
23862        let mut __struct = Self::default();
23863        __struct.temperature = buf.get_i16_le()?;
23864        __struct.humidity = buf.get_u16_le()?;
23865        __struct.id = buf.get_u8()?;
23866        Ok(__struct)
23867    }
23868    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23869        let mut __tmp = BytesMut::new(bytes);
23870        #[allow(clippy::absurd_extreme_comparisons)]
23871        #[allow(unused_comparisons)]
23872        if __tmp.remaining() < Self::ENCODED_LEN {
23873            panic!(
23874                "buffer is too small (need {} bytes, but got {})",
23875                Self::ENCODED_LEN,
23876                __tmp.remaining(),
23877            )
23878        }
23879        __tmp.put_i16_le(self.temperature);
23880        __tmp.put_u16_le(self.humidity);
23881        __tmp.put_u8(self.id);
23882        if matches!(version, MavlinkVersion::V2) {
23883            let len = __tmp.len();
23884            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23885        } else {
23886            __tmp.len()
23887        }
23888    }
23889}
23890#[doc = "ICAROUS heartbeat."]
23891#[doc = ""]
23892#[doc = "ID: 42000"]
23893#[derive(Debug, Clone, PartialEq)]
23894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23896#[cfg_attr(feature = "ts", derive(TS))]
23897#[cfg_attr(feature = "ts", ts(export))]
23898pub struct ICAROUS_HEARTBEAT_DATA {
23899    #[doc = "See the FMS_STATE enum."]
23900    pub status: IcarousFmsState,
23901}
23902impl ICAROUS_HEARTBEAT_DATA {
23903    pub const ENCODED_LEN: usize = 1usize;
23904    pub const DEFAULT: Self = Self {
23905        status: IcarousFmsState::DEFAULT,
23906    };
23907    #[cfg(feature = "arbitrary")]
23908    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23909        use arbitrary::{Arbitrary, Unstructured};
23910        let mut buf = [0u8; 1024];
23911        rng.fill_bytes(&mut buf);
23912        let mut unstructured = Unstructured::new(&buf);
23913        Self::arbitrary(&mut unstructured).unwrap_or_default()
23914    }
23915}
23916impl Default for ICAROUS_HEARTBEAT_DATA {
23917    fn default() -> Self {
23918        Self::DEFAULT.clone()
23919    }
23920}
23921impl MessageData for ICAROUS_HEARTBEAT_DATA {
23922    type Message = MavMessage;
23923    const ID: u32 = 42000u32;
23924    const NAME: &'static str = "ICAROUS_HEARTBEAT";
23925    const EXTRA_CRC: u8 = 227u8;
23926    const ENCODED_LEN: usize = 1usize;
23927    fn deser(
23928        _version: MavlinkVersion,
23929        __input: &[u8],
23930    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23931        let avail_len = __input.len();
23932        let mut payload_buf = [0; Self::ENCODED_LEN];
23933        let mut buf = if avail_len < Self::ENCODED_LEN {
23934            payload_buf[0..avail_len].copy_from_slice(__input);
23935            Bytes::new(&payload_buf)
23936        } else {
23937            Bytes::new(__input)
23938        };
23939        let mut __struct = Self::default();
23940        let tmp = buf.get_u8()?;
23941        __struct.status =
23942            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23943                enum_type: "IcarousFmsState",
23944                value: tmp as u64,
23945            })?;
23946        Ok(__struct)
23947    }
23948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23949        let mut __tmp = BytesMut::new(bytes);
23950        #[allow(clippy::absurd_extreme_comparisons)]
23951        #[allow(unused_comparisons)]
23952        if __tmp.remaining() < Self::ENCODED_LEN {
23953            panic!(
23954                "buffer is too small (need {} bytes, but got {})",
23955                Self::ENCODED_LEN,
23956                __tmp.remaining(),
23957            )
23958        }
23959        __tmp.put_u8(self.status as u8);
23960        if matches!(version, MavlinkVersion::V2) {
23961            let len = __tmp.len();
23962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23963        } else {
23964            __tmp.len()
23965        }
23966    }
23967}
23968#[doc = "Kinematic multi bands (track) output from Daidalus."]
23969#[doc = ""]
23970#[doc = "ID: 42001"]
23971#[derive(Debug, Clone, PartialEq)]
23972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23974#[cfg_attr(feature = "ts", derive(TS))]
23975#[cfg_attr(feature = "ts", ts(export))]
23976pub struct ICAROUS_KINEMATIC_BANDS_DATA {
23977    #[doc = "min angle (degrees)"]
23978    pub min1: f32,
23979    #[doc = "max angle (degrees)"]
23980    pub max1: f32,
23981    #[doc = "min angle (degrees)"]
23982    pub min2: f32,
23983    #[doc = "max angle (degrees)"]
23984    pub max2: f32,
23985    #[doc = "min angle (degrees)"]
23986    pub min3: f32,
23987    #[doc = "max angle (degrees)"]
23988    pub max3: f32,
23989    #[doc = "min angle (degrees)"]
23990    pub min4: f32,
23991    #[doc = "max angle (degrees)"]
23992    pub max4: f32,
23993    #[doc = "min angle (degrees)"]
23994    pub min5: f32,
23995    #[doc = "max angle (degrees)"]
23996    pub max5: f32,
23997    #[doc = "Number of track bands"]
23998    pub numBands: i8,
23999    #[doc = "See the TRACK_BAND_TYPES enum."]
24000    pub type1: IcarousTrackBandTypes,
24001    #[doc = "See the TRACK_BAND_TYPES enum."]
24002    pub type2: IcarousTrackBandTypes,
24003    #[doc = "See the TRACK_BAND_TYPES enum."]
24004    pub type3: IcarousTrackBandTypes,
24005    #[doc = "See the TRACK_BAND_TYPES enum."]
24006    pub type4: IcarousTrackBandTypes,
24007    #[doc = "See the TRACK_BAND_TYPES enum."]
24008    pub type5: IcarousTrackBandTypes,
24009}
24010impl ICAROUS_KINEMATIC_BANDS_DATA {
24011    pub const ENCODED_LEN: usize = 46usize;
24012    pub const DEFAULT: Self = Self {
24013        min1: 0.0_f32,
24014        max1: 0.0_f32,
24015        min2: 0.0_f32,
24016        max2: 0.0_f32,
24017        min3: 0.0_f32,
24018        max3: 0.0_f32,
24019        min4: 0.0_f32,
24020        max4: 0.0_f32,
24021        min5: 0.0_f32,
24022        max5: 0.0_f32,
24023        numBands: 0_i8,
24024        type1: IcarousTrackBandTypes::DEFAULT,
24025        type2: IcarousTrackBandTypes::DEFAULT,
24026        type3: IcarousTrackBandTypes::DEFAULT,
24027        type4: IcarousTrackBandTypes::DEFAULT,
24028        type5: IcarousTrackBandTypes::DEFAULT,
24029    };
24030    #[cfg(feature = "arbitrary")]
24031    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24032        use arbitrary::{Arbitrary, Unstructured};
24033        let mut buf = [0u8; 1024];
24034        rng.fill_bytes(&mut buf);
24035        let mut unstructured = Unstructured::new(&buf);
24036        Self::arbitrary(&mut unstructured).unwrap_or_default()
24037    }
24038}
24039impl Default for ICAROUS_KINEMATIC_BANDS_DATA {
24040    fn default() -> Self {
24041        Self::DEFAULT.clone()
24042    }
24043}
24044impl MessageData for ICAROUS_KINEMATIC_BANDS_DATA {
24045    type Message = MavMessage;
24046    const ID: u32 = 42001u32;
24047    const NAME: &'static str = "ICAROUS_KINEMATIC_BANDS";
24048    const EXTRA_CRC: u8 = 239u8;
24049    const ENCODED_LEN: usize = 46usize;
24050    fn deser(
24051        _version: MavlinkVersion,
24052        __input: &[u8],
24053    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24054        let avail_len = __input.len();
24055        let mut payload_buf = [0; Self::ENCODED_LEN];
24056        let mut buf = if avail_len < Self::ENCODED_LEN {
24057            payload_buf[0..avail_len].copy_from_slice(__input);
24058            Bytes::new(&payload_buf)
24059        } else {
24060            Bytes::new(__input)
24061        };
24062        let mut __struct = Self::default();
24063        __struct.min1 = buf.get_f32_le()?;
24064        __struct.max1 = buf.get_f32_le()?;
24065        __struct.min2 = buf.get_f32_le()?;
24066        __struct.max2 = buf.get_f32_le()?;
24067        __struct.min3 = buf.get_f32_le()?;
24068        __struct.max3 = buf.get_f32_le()?;
24069        __struct.min4 = buf.get_f32_le()?;
24070        __struct.max4 = buf.get_f32_le()?;
24071        __struct.min5 = buf.get_f32_le()?;
24072        __struct.max5 = buf.get_f32_le()?;
24073        __struct.numBands = buf.get_i8()?;
24074        let tmp = buf.get_u8()?;
24075        __struct.type1 =
24076            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24077                enum_type: "IcarousTrackBandTypes",
24078                value: tmp as u64,
24079            })?;
24080        let tmp = buf.get_u8()?;
24081        __struct.type2 =
24082            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24083                enum_type: "IcarousTrackBandTypes",
24084                value: tmp as u64,
24085            })?;
24086        let tmp = buf.get_u8()?;
24087        __struct.type3 =
24088            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24089                enum_type: "IcarousTrackBandTypes",
24090                value: tmp as u64,
24091            })?;
24092        let tmp = buf.get_u8()?;
24093        __struct.type4 =
24094            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24095                enum_type: "IcarousTrackBandTypes",
24096                value: tmp as u64,
24097            })?;
24098        let tmp = buf.get_u8()?;
24099        __struct.type5 =
24100            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24101                enum_type: "IcarousTrackBandTypes",
24102                value: tmp as u64,
24103            })?;
24104        Ok(__struct)
24105    }
24106    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24107        let mut __tmp = BytesMut::new(bytes);
24108        #[allow(clippy::absurd_extreme_comparisons)]
24109        #[allow(unused_comparisons)]
24110        if __tmp.remaining() < Self::ENCODED_LEN {
24111            panic!(
24112                "buffer is too small (need {} bytes, but got {})",
24113                Self::ENCODED_LEN,
24114                __tmp.remaining(),
24115            )
24116        }
24117        __tmp.put_f32_le(self.min1);
24118        __tmp.put_f32_le(self.max1);
24119        __tmp.put_f32_le(self.min2);
24120        __tmp.put_f32_le(self.max2);
24121        __tmp.put_f32_le(self.min3);
24122        __tmp.put_f32_le(self.max3);
24123        __tmp.put_f32_le(self.min4);
24124        __tmp.put_f32_le(self.max4);
24125        __tmp.put_f32_le(self.min5);
24126        __tmp.put_f32_le(self.max5);
24127        __tmp.put_i8(self.numBands);
24128        __tmp.put_u8(self.type1 as u8);
24129        __tmp.put_u8(self.type2 as u8);
24130        __tmp.put_u8(self.type3 as u8);
24131        __tmp.put_u8(self.type4 as u8);
24132        __tmp.put_u8(self.type5 as u8);
24133        if matches!(version, MavlinkVersion::V2) {
24134            let len = __tmp.len();
24135            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24136        } else {
24137            __tmp.len()
24138        }
24139    }
24140}
24141#[doc = "Illuminator status."]
24142#[doc = ""]
24143#[doc = "ID: 440"]
24144#[derive(Debug, Clone, PartialEq)]
24145#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24146#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24147#[cfg_attr(feature = "ts", derive(TS))]
24148#[cfg_attr(feature = "ts", ts(export))]
24149pub struct ILLUMINATOR_STATUS_DATA {
24150    #[doc = "Time since the start-up of the illuminator in ms"]
24151    pub uptime_ms: u32,
24152    #[doc = "Errors"]
24153    pub error_status: IlluminatorErrorFlags,
24154    #[doc = "Illuminator brightness"]
24155    pub brightness: f32,
24156    #[doc = "Illuminator strobing period in seconds"]
24157    pub strobe_period: f32,
24158    #[doc = "Illuminator strobing duty cycle"]
24159    pub strobe_duty_cycle: f32,
24160    #[doc = "Temperature in Celsius"]
24161    pub temp_c: f32,
24162    #[doc = "Minimum strobing period in seconds"]
24163    pub min_strobe_period: f32,
24164    #[doc = "Maximum strobing period in seconds"]
24165    pub max_strobe_period: f32,
24166    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
24167    pub enable: u8,
24168    #[doc = "Supported illuminator modes"]
24169    pub mode_bitmask: IlluminatorMode,
24170    #[doc = "Illuminator mode"]
24171    pub mode: IlluminatorMode,
24172}
24173impl ILLUMINATOR_STATUS_DATA {
24174    pub const ENCODED_LEN: usize = 35usize;
24175    pub const DEFAULT: Self = Self {
24176        uptime_ms: 0_u32,
24177        error_status: IlluminatorErrorFlags::DEFAULT,
24178        brightness: 0.0_f32,
24179        strobe_period: 0.0_f32,
24180        strobe_duty_cycle: 0.0_f32,
24181        temp_c: 0.0_f32,
24182        min_strobe_period: 0.0_f32,
24183        max_strobe_period: 0.0_f32,
24184        enable: 0_u8,
24185        mode_bitmask: IlluminatorMode::DEFAULT,
24186        mode: IlluminatorMode::DEFAULT,
24187    };
24188    #[cfg(feature = "arbitrary")]
24189    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24190        use arbitrary::{Arbitrary, Unstructured};
24191        let mut buf = [0u8; 1024];
24192        rng.fill_bytes(&mut buf);
24193        let mut unstructured = Unstructured::new(&buf);
24194        Self::arbitrary(&mut unstructured).unwrap_or_default()
24195    }
24196}
24197impl Default for ILLUMINATOR_STATUS_DATA {
24198    fn default() -> Self {
24199        Self::DEFAULT.clone()
24200    }
24201}
24202impl MessageData for ILLUMINATOR_STATUS_DATA {
24203    type Message = MavMessage;
24204    const ID: u32 = 440u32;
24205    const NAME: &'static str = "ILLUMINATOR_STATUS";
24206    const EXTRA_CRC: u8 = 66u8;
24207    const ENCODED_LEN: usize = 35usize;
24208    fn deser(
24209        _version: MavlinkVersion,
24210        __input: &[u8],
24211    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24212        let avail_len = __input.len();
24213        let mut payload_buf = [0; Self::ENCODED_LEN];
24214        let mut buf = if avail_len < Self::ENCODED_LEN {
24215            payload_buf[0..avail_len].copy_from_slice(__input);
24216            Bytes::new(&payload_buf)
24217        } else {
24218            Bytes::new(__input)
24219        };
24220        let mut __struct = Self::default();
24221        __struct.uptime_ms = buf.get_u32_le()?;
24222        let tmp = buf.get_u32_le()?;
24223        __struct.error_status = IlluminatorErrorFlags::from_bits(
24224            tmp as <IlluminatorErrorFlags as Flags>::Bits,
24225        )
24226        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24227            flag_type: "IlluminatorErrorFlags",
24228            value: tmp as u64,
24229        })?;
24230        __struct.brightness = buf.get_f32_le()?;
24231        __struct.strobe_period = buf.get_f32_le()?;
24232        __struct.strobe_duty_cycle = buf.get_f32_le()?;
24233        __struct.temp_c = buf.get_f32_le()?;
24234        __struct.min_strobe_period = buf.get_f32_le()?;
24235        __struct.max_strobe_period = buf.get_f32_le()?;
24236        __struct.enable = buf.get_u8()?;
24237        let tmp = buf.get_u8()?;
24238        __struct.mode_bitmask =
24239            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24240                enum_type: "IlluminatorMode",
24241                value: tmp as u64,
24242            })?;
24243        let tmp = buf.get_u8()?;
24244        __struct.mode =
24245            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24246                enum_type: "IlluminatorMode",
24247                value: tmp as u64,
24248            })?;
24249        Ok(__struct)
24250    }
24251    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24252        let mut __tmp = BytesMut::new(bytes);
24253        #[allow(clippy::absurd_extreme_comparisons)]
24254        #[allow(unused_comparisons)]
24255        if __tmp.remaining() < Self::ENCODED_LEN {
24256            panic!(
24257                "buffer is too small (need {} bytes, but got {})",
24258                Self::ENCODED_LEN,
24259                __tmp.remaining(),
24260            )
24261        }
24262        __tmp.put_u32_le(self.uptime_ms);
24263        __tmp.put_u32_le(self.error_status.bits() as u32);
24264        __tmp.put_f32_le(self.brightness);
24265        __tmp.put_f32_le(self.strobe_period);
24266        __tmp.put_f32_le(self.strobe_duty_cycle);
24267        __tmp.put_f32_le(self.temp_c);
24268        __tmp.put_f32_le(self.min_strobe_period);
24269        __tmp.put_f32_le(self.max_strobe_period);
24270        __tmp.put_u8(self.enable);
24271        __tmp.put_u8(self.mode_bitmask as u8);
24272        __tmp.put_u8(self.mode as u8);
24273        if matches!(version, MavlinkVersion::V2) {
24274            let len = __tmp.len();
24275            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24276        } else {
24277            __tmp.len()
24278        }
24279    }
24280}
24281#[doc = "Status of the Iridium SBD link."]
24282#[doc = ""]
24283#[doc = "ID: 335"]
24284#[derive(Debug, Clone, PartialEq)]
24285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24286#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24287#[cfg_attr(feature = "ts", derive(TS))]
24288#[cfg_attr(feature = "ts", ts(export))]
24289pub struct ISBD_LINK_STATUS_DATA {
24290    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24291    pub timestamp: u64,
24292    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24293    pub last_heartbeat: u64,
24294    #[doc = "Number of failed SBD sessions."]
24295    pub failed_sessions: u16,
24296    #[doc = "Number of successful SBD sessions."]
24297    pub successful_sessions: u16,
24298    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
24299    pub signal_quality: u8,
24300    #[doc = "1: Ring call pending, 0: No call pending."]
24301    pub ring_pending: u8,
24302    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
24303    pub tx_session_pending: u8,
24304    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
24305    pub rx_session_pending: u8,
24306}
24307impl ISBD_LINK_STATUS_DATA {
24308    pub const ENCODED_LEN: usize = 24usize;
24309    pub const DEFAULT: Self = Self {
24310        timestamp: 0_u64,
24311        last_heartbeat: 0_u64,
24312        failed_sessions: 0_u16,
24313        successful_sessions: 0_u16,
24314        signal_quality: 0_u8,
24315        ring_pending: 0_u8,
24316        tx_session_pending: 0_u8,
24317        rx_session_pending: 0_u8,
24318    };
24319    #[cfg(feature = "arbitrary")]
24320    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24321        use arbitrary::{Arbitrary, Unstructured};
24322        let mut buf = [0u8; 1024];
24323        rng.fill_bytes(&mut buf);
24324        let mut unstructured = Unstructured::new(&buf);
24325        Self::arbitrary(&mut unstructured).unwrap_or_default()
24326    }
24327}
24328impl Default for ISBD_LINK_STATUS_DATA {
24329    fn default() -> Self {
24330        Self::DEFAULT.clone()
24331    }
24332}
24333impl MessageData for ISBD_LINK_STATUS_DATA {
24334    type Message = MavMessage;
24335    const ID: u32 = 335u32;
24336    const NAME: &'static str = "ISBD_LINK_STATUS";
24337    const EXTRA_CRC: u8 = 225u8;
24338    const ENCODED_LEN: usize = 24usize;
24339    fn deser(
24340        _version: MavlinkVersion,
24341        __input: &[u8],
24342    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24343        let avail_len = __input.len();
24344        let mut payload_buf = [0; Self::ENCODED_LEN];
24345        let mut buf = if avail_len < Self::ENCODED_LEN {
24346            payload_buf[0..avail_len].copy_from_slice(__input);
24347            Bytes::new(&payload_buf)
24348        } else {
24349            Bytes::new(__input)
24350        };
24351        let mut __struct = Self::default();
24352        __struct.timestamp = buf.get_u64_le()?;
24353        __struct.last_heartbeat = buf.get_u64_le()?;
24354        __struct.failed_sessions = buf.get_u16_le()?;
24355        __struct.successful_sessions = buf.get_u16_le()?;
24356        __struct.signal_quality = buf.get_u8()?;
24357        __struct.ring_pending = buf.get_u8()?;
24358        __struct.tx_session_pending = buf.get_u8()?;
24359        __struct.rx_session_pending = buf.get_u8()?;
24360        Ok(__struct)
24361    }
24362    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24363        let mut __tmp = BytesMut::new(bytes);
24364        #[allow(clippy::absurd_extreme_comparisons)]
24365        #[allow(unused_comparisons)]
24366        if __tmp.remaining() < Self::ENCODED_LEN {
24367            panic!(
24368                "buffer is too small (need {} bytes, but got {})",
24369                Self::ENCODED_LEN,
24370                __tmp.remaining(),
24371            )
24372        }
24373        __tmp.put_u64_le(self.timestamp);
24374        __tmp.put_u64_le(self.last_heartbeat);
24375        __tmp.put_u16_le(self.failed_sessions);
24376        __tmp.put_u16_le(self.successful_sessions);
24377        __tmp.put_u8(self.signal_quality);
24378        __tmp.put_u8(self.ring_pending);
24379        __tmp.put_u8(self.tx_session_pending);
24380        __tmp.put_u8(self.rx_session_pending);
24381        if matches!(version, MavlinkVersion::V2) {
24382            let len = __tmp.len();
24383            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24384        } else {
24385            __tmp.len()
24386        }
24387    }
24388}
24389#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
24390#[doc = ""]
24391#[doc = "ID: 149"]
24392#[derive(Debug, Clone, PartialEq)]
24393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24395#[cfg_attr(feature = "ts", derive(TS))]
24396#[cfg_attr(feature = "ts", ts(export))]
24397pub struct LANDING_TARGET_DATA {
24398    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24399    pub time_usec: u64,
24400    #[doc = "X-axis angular offset of the target from the center of the image"]
24401    pub angle_x: f32,
24402    #[doc = "Y-axis angular offset of the target from the center of the image"]
24403    pub angle_y: f32,
24404    #[doc = "Distance to the target from the vehicle"]
24405    pub distance: f32,
24406    #[doc = "Size of target along x-axis"]
24407    pub size_x: f32,
24408    #[doc = "Size of target along y-axis"]
24409    pub size_y: f32,
24410    #[doc = "The ID of the target if multiple targets are present"]
24411    pub target_num: u8,
24412    #[doc = "Coordinate frame used for following fields."]
24413    pub frame: MavFrame,
24414    #[doc = "X Position of the landing target in MAV_FRAME"]
24415    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24416    pub x: f32,
24417    #[doc = "Y Position of the landing target in MAV_FRAME"]
24418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24419    pub y: f32,
24420    #[doc = "Z Position of the landing target in MAV_FRAME"]
24421    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24422    pub z: f32,
24423    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
24424    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24425    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24426    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24427    pub q: [f32; 4],
24428    #[doc = "Type of landing target"]
24429    #[cfg_attr(feature = "serde", serde(default))]
24430    pub mavtype: LandingTargetType,
24431    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
24432    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24433    pub position_valid: u8,
24434}
24435impl LANDING_TARGET_DATA {
24436    pub const ENCODED_LEN: usize = 60usize;
24437    pub const DEFAULT: Self = Self {
24438        time_usec: 0_u64,
24439        angle_x: 0.0_f32,
24440        angle_y: 0.0_f32,
24441        distance: 0.0_f32,
24442        size_x: 0.0_f32,
24443        size_y: 0.0_f32,
24444        target_num: 0_u8,
24445        frame: MavFrame::DEFAULT,
24446        x: 0.0_f32,
24447        y: 0.0_f32,
24448        z: 0.0_f32,
24449        q: [0.0_f32; 4usize],
24450        mavtype: LandingTargetType::DEFAULT,
24451        position_valid: 0_u8,
24452    };
24453    #[cfg(feature = "arbitrary")]
24454    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24455        use arbitrary::{Arbitrary, Unstructured};
24456        let mut buf = [0u8; 1024];
24457        rng.fill_bytes(&mut buf);
24458        let mut unstructured = Unstructured::new(&buf);
24459        Self::arbitrary(&mut unstructured).unwrap_or_default()
24460    }
24461}
24462impl Default for LANDING_TARGET_DATA {
24463    fn default() -> Self {
24464        Self::DEFAULT.clone()
24465    }
24466}
24467impl MessageData for LANDING_TARGET_DATA {
24468    type Message = MavMessage;
24469    const ID: u32 = 149u32;
24470    const NAME: &'static str = "LANDING_TARGET";
24471    const EXTRA_CRC: u8 = 200u8;
24472    const ENCODED_LEN: usize = 60usize;
24473    fn deser(
24474        _version: MavlinkVersion,
24475        __input: &[u8],
24476    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24477        let avail_len = __input.len();
24478        let mut payload_buf = [0; Self::ENCODED_LEN];
24479        let mut buf = if avail_len < Self::ENCODED_LEN {
24480            payload_buf[0..avail_len].copy_from_slice(__input);
24481            Bytes::new(&payload_buf)
24482        } else {
24483            Bytes::new(__input)
24484        };
24485        let mut __struct = Self::default();
24486        __struct.time_usec = buf.get_u64_le()?;
24487        __struct.angle_x = buf.get_f32_le()?;
24488        __struct.angle_y = buf.get_f32_le()?;
24489        __struct.distance = buf.get_f32_le()?;
24490        __struct.size_x = buf.get_f32_le()?;
24491        __struct.size_y = buf.get_f32_le()?;
24492        __struct.target_num = buf.get_u8()?;
24493        let tmp = buf.get_u8()?;
24494        __struct.frame =
24495            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24496                enum_type: "MavFrame",
24497                value: tmp as u64,
24498            })?;
24499        __struct.x = buf.get_f32_le()?;
24500        __struct.y = buf.get_f32_le()?;
24501        __struct.z = buf.get_f32_le()?;
24502        for v in &mut __struct.q {
24503            let val = buf.get_f32_le()?;
24504            *v = val;
24505        }
24506        let tmp = buf.get_u8()?;
24507        __struct.mavtype =
24508            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24509                enum_type: "LandingTargetType",
24510                value: tmp as u64,
24511            })?;
24512        __struct.position_valid = buf.get_u8()?;
24513        Ok(__struct)
24514    }
24515    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24516        let mut __tmp = BytesMut::new(bytes);
24517        #[allow(clippy::absurd_extreme_comparisons)]
24518        #[allow(unused_comparisons)]
24519        if __tmp.remaining() < Self::ENCODED_LEN {
24520            panic!(
24521                "buffer is too small (need {} bytes, but got {})",
24522                Self::ENCODED_LEN,
24523                __tmp.remaining(),
24524            )
24525        }
24526        __tmp.put_u64_le(self.time_usec);
24527        __tmp.put_f32_le(self.angle_x);
24528        __tmp.put_f32_le(self.angle_y);
24529        __tmp.put_f32_le(self.distance);
24530        __tmp.put_f32_le(self.size_x);
24531        __tmp.put_f32_le(self.size_y);
24532        __tmp.put_u8(self.target_num);
24533        __tmp.put_u8(self.frame as u8);
24534        if matches!(version, MavlinkVersion::V2) {
24535            __tmp.put_f32_le(self.x);
24536            __tmp.put_f32_le(self.y);
24537            __tmp.put_f32_le(self.z);
24538            for val in &self.q {
24539                __tmp.put_f32_le(*val);
24540            }
24541            __tmp.put_u8(self.mavtype as u8);
24542            __tmp.put_u8(self.position_valid);
24543            let len = __tmp.len();
24544            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24545        } else {
24546            __tmp.len()
24547        }
24548    }
24549}
24550#[doc = "Control vehicle LEDs."]
24551#[doc = ""]
24552#[doc = "ID: 186"]
24553#[derive(Debug, Clone, PartialEq)]
24554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24556#[cfg_attr(feature = "ts", derive(TS))]
24557#[cfg_attr(feature = "ts", ts(export))]
24558pub struct LED_CONTROL_DATA {
24559    #[doc = "System ID."]
24560    pub target_system: u8,
24561    #[doc = "Component ID."]
24562    pub target_component: u8,
24563    #[doc = "Instance (LED instance to control or 255 for all LEDs)."]
24564    pub instance: u8,
24565    #[doc = "Pattern (see LED_PATTERN_ENUM)."]
24566    pub pattern: u8,
24567    #[doc = "Custom Byte Length."]
24568    pub custom_len: u8,
24569    #[doc = "Custom Bytes."]
24570    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24571    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24572    pub custom_bytes: [u8; 24],
24573}
24574impl LED_CONTROL_DATA {
24575    pub const ENCODED_LEN: usize = 29usize;
24576    pub const DEFAULT: Self = Self {
24577        target_system: 0_u8,
24578        target_component: 0_u8,
24579        instance: 0_u8,
24580        pattern: 0_u8,
24581        custom_len: 0_u8,
24582        custom_bytes: [0_u8; 24usize],
24583    };
24584    #[cfg(feature = "arbitrary")]
24585    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24586        use arbitrary::{Arbitrary, Unstructured};
24587        let mut buf = [0u8; 1024];
24588        rng.fill_bytes(&mut buf);
24589        let mut unstructured = Unstructured::new(&buf);
24590        Self::arbitrary(&mut unstructured).unwrap_or_default()
24591    }
24592}
24593impl Default for LED_CONTROL_DATA {
24594    fn default() -> Self {
24595        Self::DEFAULT.clone()
24596    }
24597}
24598impl MessageData for LED_CONTROL_DATA {
24599    type Message = MavMessage;
24600    const ID: u32 = 186u32;
24601    const NAME: &'static str = "LED_CONTROL";
24602    const EXTRA_CRC: u8 = 72u8;
24603    const ENCODED_LEN: usize = 29usize;
24604    fn deser(
24605        _version: MavlinkVersion,
24606        __input: &[u8],
24607    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24608        let avail_len = __input.len();
24609        let mut payload_buf = [0; Self::ENCODED_LEN];
24610        let mut buf = if avail_len < Self::ENCODED_LEN {
24611            payload_buf[0..avail_len].copy_from_slice(__input);
24612            Bytes::new(&payload_buf)
24613        } else {
24614            Bytes::new(__input)
24615        };
24616        let mut __struct = Self::default();
24617        __struct.target_system = buf.get_u8()?;
24618        __struct.target_component = buf.get_u8()?;
24619        __struct.instance = buf.get_u8()?;
24620        __struct.pattern = buf.get_u8()?;
24621        __struct.custom_len = buf.get_u8()?;
24622        for v in &mut __struct.custom_bytes {
24623            let val = buf.get_u8()?;
24624            *v = val;
24625        }
24626        Ok(__struct)
24627    }
24628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24629        let mut __tmp = BytesMut::new(bytes);
24630        #[allow(clippy::absurd_extreme_comparisons)]
24631        #[allow(unused_comparisons)]
24632        if __tmp.remaining() < Self::ENCODED_LEN {
24633            panic!(
24634                "buffer is too small (need {} bytes, but got {})",
24635                Self::ENCODED_LEN,
24636                __tmp.remaining(),
24637            )
24638        }
24639        __tmp.put_u8(self.target_system);
24640        __tmp.put_u8(self.target_component);
24641        __tmp.put_u8(self.instance);
24642        __tmp.put_u8(self.pattern);
24643        __tmp.put_u8(self.custom_len);
24644        for val in &self.custom_bytes {
24645            __tmp.put_u8(*val);
24646        }
24647        if matches!(version, MavlinkVersion::V2) {
24648            let len = __tmp.len();
24649            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24650        } else {
24651            __tmp.len()
24652        }
24653    }
24654}
24655#[doc = "Status of AP_Limits. Sent in extended status stream when AP_Limits is enabled."]
24656#[doc = ""]
24657#[doc = "ID: 167"]
24658#[derive(Debug, Clone, PartialEq)]
24659#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24660#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24661#[cfg_attr(feature = "ts", derive(TS))]
24662#[cfg_attr(feature = "ts", ts(export))]
24663pub struct LIMITS_STATUS_DATA {
24664    #[doc = "Time (since boot) of last breach."]
24665    pub last_trigger: u32,
24666    #[doc = "Time (since boot) of last recovery action."]
24667    pub last_action: u32,
24668    #[doc = "Time (since boot) of last successful recovery."]
24669    pub last_recovery: u32,
24670    #[doc = "Time (since boot) of last all-clear."]
24671    pub last_clear: u32,
24672    #[doc = "Number of fence breaches."]
24673    pub breach_count: u16,
24674    #[doc = "State of AP_Limits."]
24675    pub limits_state: LimitsState,
24676    #[doc = "AP_Limit_Module bitfield of enabled modules."]
24677    pub mods_enabled: LimitModule,
24678    #[doc = "AP_Limit_Module bitfield of required modules."]
24679    pub mods_required: LimitModule,
24680    #[doc = "AP_Limit_Module bitfield of triggered modules."]
24681    pub mods_triggered: LimitModule,
24682}
24683impl LIMITS_STATUS_DATA {
24684    pub const ENCODED_LEN: usize = 22usize;
24685    pub const DEFAULT: Self = Self {
24686        last_trigger: 0_u32,
24687        last_action: 0_u32,
24688        last_recovery: 0_u32,
24689        last_clear: 0_u32,
24690        breach_count: 0_u16,
24691        limits_state: LimitsState::DEFAULT,
24692        mods_enabled: LimitModule::DEFAULT,
24693        mods_required: LimitModule::DEFAULT,
24694        mods_triggered: LimitModule::DEFAULT,
24695    };
24696    #[cfg(feature = "arbitrary")]
24697    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24698        use arbitrary::{Arbitrary, Unstructured};
24699        let mut buf = [0u8; 1024];
24700        rng.fill_bytes(&mut buf);
24701        let mut unstructured = Unstructured::new(&buf);
24702        Self::arbitrary(&mut unstructured).unwrap_or_default()
24703    }
24704}
24705impl Default for LIMITS_STATUS_DATA {
24706    fn default() -> Self {
24707        Self::DEFAULT.clone()
24708    }
24709}
24710impl MessageData for LIMITS_STATUS_DATA {
24711    type Message = MavMessage;
24712    const ID: u32 = 167u32;
24713    const NAME: &'static str = "LIMITS_STATUS";
24714    const EXTRA_CRC: u8 = 144u8;
24715    const ENCODED_LEN: usize = 22usize;
24716    fn deser(
24717        _version: MavlinkVersion,
24718        __input: &[u8],
24719    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24720        let avail_len = __input.len();
24721        let mut payload_buf = [0; Self::ENCODED_LEN];
24722        let mut buf = if avail_len < Self::ENCODED_LEN {
24723            payload_buf[0..avail_len].copy_from_slice(__input);
24724            Bytes::new(&payload_buf)
24725        } else {
24726            Bytes::new(__input)
24727        };
24728        let mut __struct = Self::default();
24729        __struct.last_trigger = buf.get_u32_le()?;
24730        __struct.last_action = buf.get_u32_le()?;
24731        __struct.last_recovery = buf.get_u32_le()?;
24732        __struct.last_clear = buf.get_u32_le()?;
24733        __struct.breach_count = buf.get_u16_le()?;
24734        let tmp = buf.get_u8()?;
24735        __struct.limits_state =
24736            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24737                enum_type: "LimitsState",
24738                value: tmp as u64,
24739            })?;
24740        let tmp = buf.get_u8()?;
24741        __struct.mods_enabled = LimitModule::from_bits(tmp as <LimitModule as Flags>::Bits).ok_or(
24742            ::mavlink_core::error::ParserError::InvalidFlag {
24743                flag_type: "LimitModule",
24744                value: tmp as u64,
24745            },
24746        )?;
24747        let tmp = buf.get_u8()?;
24748        __struct.mods_required = LimitModule::from_bits(tmp as <LimitModule as Flags>::Bits)
24749            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24750                flag_type: "LimitModule",
24751                value: tmp as u64,
24752            })?;
24753        let tmp = buf.get_u8()?;
24754        __struct.mods_triggered = LimitModule::from_bits(tmp as <LimitModule as Flags>::Bits)
24755            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24756                flag_type: "LimitModule",
24757                value: tmp as u64,
24758            })?;
24759        Ok(__struct)
24760    }
24761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24762        let mut __tmp = BytesMut::new(bytes);
24763        #[allow(clippy::absurd_extreme_comparisons)]
24764        #[allow(unused_comparisons)]
24765        if __tmp.remaining() < Self::ENCODED_LEN {
24766            panic!(
24767                "buffer is too small (need {} bytes, but got {})",
24768                Self::ENCODED_LEN,
24769                __tmp.remaining(),
24770            )
24771        }
24772        __tmp.put_u32_le(self.last_trigger);
24773        __tmp.put_u32_le(self.last_action);
24774        __tmp.put_u32_le(self.last_recovery);
24775        __tmp.put_u32_le(self.last_clear);
24776        __tmp.put_u16_le(self.breach_count);
24777        __tmp.put_u8(self.limits_state as u8);
24778        __tmp.put_u8(self.mods_enabled.bits() as u8);
24779        __tmp.put_u8(self.mods_required.bits() as u8);
24780        __tmp.put_u8(self.mods_triggered.bits() as u8);
24781        if matches!(version, MavlinkVersion::V2) {
24782            let len = __tmp.len();
24783            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24784        } else {
24785            __tmp.len()
24786        }
24787    }
24788}
24789#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
24790#[doc = ""]
24791#[doc = "ID: 8"]
24792#[derive(Debug, Clone, PartialEq)]
24793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24795#[cfg_attr(feature = "ts", derive(TS))]
24796#[cfg_attr(feature = "ts", ts(export))]
24797pub struct LINK_NODE_STATUS_DATA {
24798    #[doc = "Timestamp (time since system boot)."]
24799    pub timestamp: u64,
24800    #[doc = "Transmit rate"]
24801    pub tx_rate: u32,
24802    #[doc = "Receive rate"]
24803    pub rx_rate: u32,
24804    #[doc = "Messages sent"]
24805    pub messages_sent: u32,
24806    #[doc = "Messages received (estimated from counting seq)"]
24807    pub messages_received: u32,
24808    #[doc = "Messages lost (estimated from counting seq)"]
24809    pub messages_lost: u32,
24810    #[doc = "Number of bytes that could not be parsed correctly."]
24811    pub rx_parse_err: u16,
24812    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
24813    pub tx_overflows: u16,
24814    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
24815    pub rx_overflows: u16,
24816    #[doc = "Remaining free transmit buffer space"]
24817    pub tx_buf: u8,
24818    #[doc = "Remaining free receive buffer space"]
24819    pub rx_buf: u8,
24820}
24821impl LINK_NODE_STATUS_DATA {
24822    pub const ENCODED_LEN: usize = 36usize;
24823    pub const DEFAULT: Self = Self {
24824        timestamp: 0_u64,
24825        tx_rate: 0_u32,
24826        rx_rate: 0_u32,
24827        messages_sent: 0_u32,
24828        messages_received: 0_u32,
24829        messages_lost: 0_u32,
24830        rx_parse_err: 0_u16,
24831        tx_overflows: 0_u16,
24832        rx_overflows: 0_u16,
24833        tx_buf: 0_u8,
24834        rx_buf: 0_u8,
24835    };
24836    #[cfg(feature = "arbitrary")]
24837    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24838        use arbitrary::{Arbitrary, Unstructured};
24839        let mut buf = [0u8; 1024];
24840        rng.fill_bytes(&mut buf);
24841        let mut unstructured = Unstructured::new(&buf);
24842        Self::arbitrary(&mut unstructured).unwrap_or_default()
24843    }
24844}
24845impl Default for LINK_NODE_STATUS_DATA {
24846    fn default() -> Self {
24847        Self::DEFAULT.clone()
24848    }
24849}
24850impl MessageData for LINK_NODE_STATUS_DATA {
24851    type Message = MavMessage;
24852    const ID: u32 = 8u32;
24853    const NAME: &'static str = "LINK_NODE_STATUS";
24854    const EXTRA_CRC: u8 = 117u8;
24855    const ENCODED_LEN: usize = 36usize;
24856    fn deser(
24857        _version: MavlinkVersion,
24858        __input: &[u8],
24859    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24860        let avail_len = __input.len();
24861        let mut payload_buf = [0; Self::ENCODED_LEN];
24862        let mut buf = if avail_len < Self::ENCODED_LEN {
24863            payload_buf[0..avail_len].copy_from_slice(__input);
24864            Bytes::new(&payload_buf)
24865        } else {
24866            Bytes::new(__input)
24867        };
24868        let mut __struct = Self::default();
24869        __struct.timestamp = buf.get_u64_le()?;
24870        __struct.tx_rate = buf.get_u32_le()?;
24871        __struct.rx_rate = buf.get_u32_le()?;
24872        __struct.messages_sent = buf.get_u32_le()?;
24873        __struct.messages_received = buf.get_u32_le()?;
24874        __struct.messages_lost = buf.get_u32_le()?;
24875        __struct.rx_parse_err = buf.get_u16_le()?;
24876        __struct.tx_overflows = buf.get_u16_le()?;
24877        __struct.rx_overflows = buf.get_u16_le()?;
24878        __struct.tx_buf = buf.get_u8()?;
24879        __struct.rx_buf = buf.get_u8()?;
24880        Ok(__struct)
24881    }
24882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24883        let mut __tmp = BytesMut::new(bytes);
24884        #[allow(clippy::absurd_extreme_comparisons)]
24885        #[allow(unused_comparisons)]
24886        if __tmp.remaining() < Self::ENCODED_LEN {
24887            panic!(
24888                "buffer is too small (need {} bytes, but got {})",
24889                Self::ENCODED_LEN,
24890                __tmp.remaining(),
24891            )
24892        }
24893        __tmp.put_u64_le(self.timestamp);
24894        __tmp.put_u32_le(self.tx_rate);
24895        __tmp.put_u32_le(self.rx_rate);
24896        __tmp.put_u32_le(self.messages_sent);
24897        __tmp.put_u32_le(self.messages_received);
24898        __tmp.put_u32_le(self.messages_lost);
24899        __tmp.put_u16_le(self.rx_parse_err);
24900        __tmp.put_u16_le(self.tx_overflows);
24901        __tmp.put_u16_le(self.rx_overflows);
24902        __tmp.put_u8(self.tx_buf);
24903        __tmp.put_u8(self.rx_buf);
24904        if matches!(version, MavlinkVersion::V2) {
24905            let len = __tmp.len();
24906            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24907        } else {
24908            __tmp.len()
24909        }
24910    }
24911}
24912#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
24913#[doc = ""]
24914#[doc = "ID: 32"]
24915#[derive(Debug, Clone, PartialEq)]
24916#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24918#[cfg_attr(feature = "ts", derive(TS))]
24919#[cfg_attr(feature = "ts", ts(export))]
24920pub struct LOCAL_POSITION_NED_DATA {
24921    #[doc = "Timestamp (time since system boot)."]
24922    pub time_boot_ms: u32,
24923    #[doc = "X Position"]
24924    pub x: f32,
24925    #[doc = "Y Position"]
24926    pub y: f32,
24927    #[doc = "Z Position"]
24928    pub z: f32,
24929    #[doc = "X Speed"]
24930    pub vx: f32,
24931    #[doc = "Y Speed"]
24932    pub vy: f32,
24933    #[doc = "Z Speed"]
24934    pub vz: f32,
24935}
24936impl LOCAL_POSITION_NED_DATA {
24937    pub const ENCODED_LEN: usize = 28usize;
24938    pub const DEFAULT: Self = Self {
24939        time_boot_ms: 0_u32,
24940        x: 0.0_f32,
24941        y: 0.0_f32,
24942        z: 0.0_f32,
24943        vx: 0.0_f32,
24944        vy: 0.0_f32,
24945        vz: 0.0_f32,
24946    };
24947    #[cfg(feature = "arbitrary")]
24948    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24949        use arbitrary::{Arbitrary, Unstructured};
24950        let mut buf = [0u8; 1024];
24951        rng.fill_bytes(&mut buf);
24952        let mut unstructured = Unstructured::new(&buf);
24953        Self::arbitrary(&mut unstructured).unwrap_or_default()
24954    }
24955}
24956impl Default for LOCAL_POSITION_NED_DATA {
24957    fn default() -> Self {
24958        Self::DEFAULT.clone()
24959    }
24960}
24961impl MessageData for LOCAL_POSITION_NED_DATA {
24962    type Message = MavMessage;
24963    const ID: u32 = 32u32;
24964    const NAME: &'static str = "LOCAL_POSITION_NED";
24965    const EXTRA_CRC: u8 = 185u8;
24966    const ENCODED_LEN: usize = 28usize;
24967    fn deser(
24968        _version: MavlinkVersion,
24969        __input: &[u8],
24970    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24971        let avail_len = __input.len();
24972        let mut payload_buf = [0; Self::ENCODED_LEN];
24973        let mut buf = if avail_len < Self::ENCODED_LEN {
24974            payload_buf[0..avail_len].copy_from_slice(__input);
24975            Bytes::new(&payload_buf)
24976        } else {
24977            Bytes::new(__input)
24978        };
24979        let mut __struct = Self::default();
24980        __struct.time_boot_ms = buf.get_u32_le()?;
24981        __struct.x = buf.get_f32_le()?;
24982        __struct.y = buf.get_f32_le()?;
24983        __struct.z = buf.get_f32_le()?;
24984        __struct.vx = buf.get_f32_le()?;
24985        __struct.vy = buf.get_f32_le()?;
24986        __struct.vz = buf.get_f32_le()?;
24987        Ok(__struct)
24988    }
24989    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24990        let mut __tmp = BytesMut::new(bytes);
24991        #[allow(clippy::absurd_extreme_comparisons)]
24992        #[allow(unused_comparisons)]
24993        if __tmp.remaining() < Self::ENCODED_LEN {
24994            panic!(
24995                "buffer is too small (need {} bytes, but got {})",
24996                Self::ENCODED_LEN,
24997                __tmp.remaining(),
24998            )
24999        }
25000        __tmp.put_u32_le(self.time_boot_ms);
25001        __tmp.put_f32_le(self.x);
25002        __tmp.put_f32_le(self.y);
25003        __tmp.put_f32_le(self.z);
25004        __tmp.put_f32_le(self.vx);
25005        __tmp.put_f32_le(self.vy);
25006        __tmp.put_f32_le(self.vz);
25007        if matches!(version, MavlinkVersion::V2) {
25008            let len = __tmp.len();
25009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25010        } else {
25011            __tmp.len()
25012        }
25013    }
25014}
25015#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
25016#[doc = ""]
25017#[doc = "ID: 64"]
25018#[derive(Debug, Clone, PartialEq)]
25019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25021#[cfg_attr(feature = "ts", derive(TS))]
25022#[cfg_attr(feature = "ts", ts(export))]
25023pub struct LOCAL_POSITION_NED_COV_DATA {
25024    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25025    pub time_usec: u64,
25026    #[doc = "X Position"]
25027    pub x: f32,
25028    #[doc = "Y Position"]
25029    pub y: f32,
25030    #[doc = "Z Position"]
25031    pub z: f32,
25032    #[doc = "X Speed"]
25033    pub vx: f32,
25034    #[doc = "Y Speed"]
25035    pub vy: f32,
25036    #[doc = "Z Speed"]
25037    pub vz: f32,
25038    #[doc = "X Acceleration"]
25039    pub ax: f32,
25040    #[doc = "Y Acceleration"]
25041    pub ay: f32,
25042    #[doc = "Z Acceleration"]
25043    pub az: f32,
25044    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
25045    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25046    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25047    pub covariance: [f32; 45],
25048    #[doc = "Class id of the estimator this estimate originated from."]
25049    pub estimator_type: MavEstimatorType,
25050}
25051impl LOCAL_POSITION_NED_COV_DATA {
25052    pub const ENCODED_LEN: usize = 225usize;
25053    pub const DEFAULT: Self = Self {
25054        time_usec: 0_u64,
25055        x: 0.0_f32,
25056        y: 0.0_f32,
25057        z: 0.0_f32,
25058        vx: 0.0_f32,
25059        vy: 0.0_f32,
25060        vz: 0.0_f32,
25061        ax: 0.0_f32,
25062        ay: 0.0_f32,
25063        az: 0.0_f32,
25064        covariance: [0.0_f32; 45usize],
25065        estimator_type: MavEstimatorType::DEFAULT,
25066    };
25067    #[cfg(feature = "arbitrary")]
25068    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25069        use arbitrary::{Arbitrary, Unstructured};
25070        let mut buf = [0u8; 1024];
25071        rng.fill_bytes(&mut buf);
25072        let mut unstructured = Unstructured::new(&buf);
25073        Self::arbitrary(&mut unstructured).unwrap_or_default()
25074    }
25075}
25076impl Default for LOCAL_POSITION_NED_COV_DATA {
25077    fn default() -> Self {
25078        Self::DEFAULT.clone()
25079    }
25080}
25081impl MessageData for LOCAL_POSITION_NED_COV_DATA {
25082    type Message = MavMessage;
25083    const ID: u32 = 64u32;
25084    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
25085    const EXTRA_CRC: u8 = 191u8;
25086    const ENCODED_LEN: usize = 225usize;
25087    fn deser(
25088        _version: MavlinkVersion,
25089        __input: &[u8],
25090    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25091        let avail_len = __input.len();
25092        let mut payload_buf = [0; Self::ENCODED_LEN];
25093        let mut buf = if avail_len < Self::ENCODED_LEN {
25094            payload_buf[0..avail_len].copy_from_slice(__input);
25095            Bytes::new(&payload_buf)
25096        } else {
25097            Bytes::new(__input)
25098        };
25099        let mut __struct = Self::default();
25100        __struct.time_usec = buf.get_u64_le()?;
25101        __struct.x = buf.get_f32_le()?;
25102        __struct.y = buf.get_f32_le()?;
25103        __struct.z = buf.get_f32_le()?;
25104        __struct.vx = buf.get_f32_le()?;
25105        __struct.vy = buf.get_f32_le()?;
25106        __struct.vz = buf.get_f32_le()?;
25107        __struct.ax = buf.get_f32_le()?;
25108        __struct.ay = buf.get_f32_le()?;
25109        __struct.az = buf.get_f32_le()?;
25110        for v in &mut __struct.covariance {
25111            let val = buf.get_f32_le()?;
25112            *v = val;
25113        }
25114        let tmp = buf.get_u8()?;
25115        __struct.estimator_type =
25116            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25117                enum_type: "MavEstimatorType",
25118                value: tmp as u64,
25119            })?;
25120        Ok(__struct)
25121    }
25122    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25123        let mut __tmp = BytesMut::new(bytes);
25124        #[allow(clippy::absurd_extreme_comparisons)]
25125        #[allow(unused_comparisons)]
25126        if __tmp.remaining() < Self::ENCODED_LEN {
25127            panic!(
25128                "buffer is too small (need {} bytes, but got {})",
25129                Self::ENCODED_LEN,
25130                __tmp.remaining(),
25131            )
25132        }
25133        __tmp.put_u64_le(self.time_usec);
25134        __tmp.put_f32_le(self.x);
25135        __tmp.put_f32_le(self.y);
25136        __tmp.put_f32_le(self.z);
25137        __tmp.put_f32_le(self.vx);
25138        __tmp.put_f32_le(self.vy);
25139        __tmp.put_f32_le(self.vz);
25140        __tmp.put_f32_le(self.ax);
25141        __tmp.put_f32_le(self.ay);
25142        __tmp.put_f32_le(self.az);
25143        for val in &self.covariance {
25144            __tmp.put_f32_le(*val);
25145        }
25146        __tmp.put_u8(self.estimator_type as u8);
25147        if matches!(version, MavlinkVersion::V2) {
25148            let len = __tmp.len();
25149            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25150        } else {
25151            __tmp.len()
25152        }
25153    }
25154}
25155#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
25156#[doc = ""]
25157#[doc = "ID: 89"]
25158#[derive(Debug, Clone, PartialEq)]
25159#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25160#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25161#[cfg_attr(feature = "ts", derive(TS))]
25162#[cfg_attr(feature = "ts", ts(export))]
25163pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
25164    #[doc = "Timestamp (time since system boot)."]
25165    pub time_boot_ms: u32,
25166    #[doc = "X Position"]
25167    pub x: f32,
25168    #[doc = "Y Position"]
25169    pub y: f32,
25170    #[doc = "Z Position"]
25171    pub z: f32,
25172    #[doc = "Roll"]
25173    pub roll: f32,
25174    #[doc = "Pitch"]
25175    pub pitch: f32,
25176    #[doc = "Yaw"]
25177    pub yaw: f32,
25178}
25179impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
25180    pub const ENCODED_LEN: usize = 28usize;
25181    pub const DEFAULT: Self = Self {
25182        time_boot_ms: 0_u32,
25183        x: 0.0_f32,
25184        y: 0.0_f32,
25185        z: 0.0_f32,
25186        roll: 0.0_f32,
25187        pitch: 0.0_f32,
25188        yaw: 0.0_f32,
25189    };
25190    #[cfg(feature = "arbitrary")]
25191    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25192        use arbitrary::{Arbitrary, Unstructured};
25193        let mut buf = [0u8; 1024];
25194        rng.fill_bytes(&mut buf);
25195        let mut unstructured = Unstructured::new(&buf);
25196        Self::arbitrary(&mut unstructured).unwrap_or_default()
25197    }
25198}
25199impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
25200    fn default() -> Self {
25201        Self::DEFAULT.clone()
25202    }
25203}
25204impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
25205    type Message = MavMessage;
25206    const ID: u32 = 89u32;
25207    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
25208    const EXTRA_CRC: u8 = 231u8;
25209    const ENCODED_LEN: usize = 28usize;
25210    fn deser(
25211        _version: MavlinkVersion,
25212        __input: &[u8],
25213    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25214        let avail_len = __input.len();
25215        let mut payload_buf = [0; Self::ENCODED_LEN];
25216        let mut buf = if avail_len < Self::ENCODED_LEN {
25217            payload_buf[0..avail_len].copy_from_slice(__input);
25218            Bytes::new(&payload_buf)
25219        } else {
25220            Bytes::new(__input)
25221        };
25222        let mut __struct = Self::default();
25223        __struct.time_boot_ms = buf.get_u32_le()?;
25224        __struct.x = buf.get_f32_le()?;
25225        __struct.y = buf.get_f32_le()?;
25226        __struct.z = buf.get_f32_le()?;
25227        __struct.roll = buf.get_f32_le()?;
25228        __struct.pitch = buf.get_f32_le()?;
25229        __struct.yaw = buf.get_f32_le()?;
25230        Ok(__struct)
25231    }
25232    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25233        let mut __tmp = BytesMut::new(bytes);
25234        #[allow(clippy::absurd_extreme_comparisons)]
25235        #[allow(unused_comparisons)]
25236        if __tmp.remaining() < Self::ENCODED_LEN {
25237            panic!(
25238                "buffer is too small (need {} bytes, but got {})",
25239                Self::ENCODED_LEN,
25240                __tmp.remaining(),
25241            )
25242        }
25243        __tmp.put_u32_le(self.time_boot_ms);
25244        __tmp.put_f32_le(self.x);
25245        __tmp.put_f32_le(self.y);
25246        __tmp.put_f32_le(self.z);
25247        __tmp.put_f32_le(self.roll);
25248        __tmp.put_f32_le(self.pitch);
25249        __tmp.put_f32_le(self.yaw);
25250        if matches!(version, MavlinkVersion::V2) {
25251            let len = __tmp.len();
25252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25253        } else {
25254            __tmp.len()
25255        }
25256    }
25257}
25258#[doc = "An ack for a LOGGING_DATA_ACKED message."]
25259#[doc = ""]
25260#[doc = "ID: 268"]
25261#[derive(Debug, Clone, PartialEq)]
25262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25264#[cfg_attr(feature = "ts", derive(TS))]
25265#[cfg_attr(feature = "ts", ts(export))]
25266pub struct LOGGING_ACK_DATA {
25267    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
25268    pub sequence: u16,
25269    #[doc = "system ID of the target"]
25270    pub target_system: u8,
25271    #[doc = "component ID of the target"]
25272    pub target_component: u8,
25273}
25274impl LOGGING_ACK_DATA {
25275    pub const ENCODED_LEN: usize = 4usize;
25276    pub const DEFAULT: Self = Self {
25277        sequence: 0_u16,
25278        target_system: 0_u8,
25279        target_component: 0_u8,
25280    };
25281    #[cfg(feature = "arbitrary")]
25282    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25283        use arbitrary::{Arbitrary, Unstructured};
25284        let mut buf = [0u8; 1024];
25285        rng.fill_bytes(&mut buf);
25286        let mut unstructured = Unstructured::new(&buf);
25287        Self::arbitrary(&mut unstructured).unwrap_or_default()
25288    }
25289}
25290impl Default for LOGGING_ACK_DATA {
25291    fn default() -> Self {
25292        Self::DEFAULT.clone()
25293    }
25294}
25295impl MessageData for LOGGING_ACK_DATA {
25296    type Message = MavMessage;
25297    const ID: u32 = 268u32;
25298    const NAME: &'static str = "LOGGING_ACK";
25299    const EXTRA_CRC: u8 = 14u8;
25300    const ENCODED_LEN: usize = 4usize;
25301    fn deser(
25302        _version: MavlinkVersion,
25303        __input: &[u8],
25304    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25305        let avail_len = __input.len();
25306        let mut payload_buf = [0; Self::ENCODED_LEN];
25307        let mut buf = if avail_len < Self::ENCODED_LEN {
25308            payload_buf[0..avail_len].copy_from_slice(__input);
25309            Bytes::new(&payload_buf)
25310        } else {
25311            Bytes::new(__input)
25312        };
25313        let mut __struct = Self::default();
25314        __struct.sequence = buf.get_u16_le()?;
25315        __struct.target_system = buf.get_u8()?;
25316        __struct.target_component = buf.get_u8()?;
25317        Ok(__struct)
25318    }
25319    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25320        let mut __tmp = BytesMut::new(bytes);
25321        #[allow(clippy::absurd_extreme_comparisons)]
25322        #[allow(unused_comparisons)]
25323        if __tmp.remaining() < Self::ENCODED_LEN {
25324            panic!(
25325                "buffer is too small (need {} bytes, but got {})",
25326                Self::ENCODED_LEN,
25327                __tmp.remaining(),
25328            )
25329        }
25330        __tmp.put_u16_le(self.sequence);
25331        __tmp.put_u8(self.target_system);
25332        __tmp.put_u8(self.target_component);
25333        if matches!(version, MavlinkVersion::V2) {
25334            let len = __tmp.len();
25335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25336        } else {
25337            __tmp.len()
25338        }
25339    }
25340}
25341#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
25342#[doc = ""]
25343#[doc = "ID: 266"]
25344#[derive(Debug, Clone, PartialEq)]
25345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25347#[cfg_attr(feature = "ts", derive(TS))]
25348#[cfg_attr(feature = "ts", ts(export))]
25349pub struct LOGGING_DATA_DATA {
25350    #[doc = "sequence number (can wrap)"]
25351    pub sequence: u16,
25352    #[doc = "system ID of the target"]
25353    pub target_system: u8,
25354    #[doc = "component ID of the target"]
25355    pub target_component: u8,
25356    #[doc = "data length"]
25357    pub length: u8,
25358    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
25359    pub first_message_offset: u8,
25360    #[doc = "logged data"]
25361    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25362    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25363    pub data: [u8; 249],
25364}
25365impl LOGGING_DATA_DATA {
25366    pub const ENCODED_LEN: usize = 255usize;
25367    pub const DEFAULT: Self = Self {
25368        sequence: 0_u16,
25369        target_system: 0_u8,
25370        target_component: 0_u8,
25371        length: 0_u8,
25372        first_message_offset: 0_u8,
25373        data: [0_u8; 249usize],
25374    };
25375    #[cfg(feature = "arbitrary")]
25376    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25377        use arbitrary::{Arbitrary, Unstructured};
25378        let mut buf = [0u8; 1024];
25379        rng.fill_bytes(&mut buf);
25380        let mut unstructured = Unstructured::new(&buf);
25381        Self::arbitrary(&mut unstructured).unwrap_or_default()
25382    }
25383}
25384impl Default for LOGGING_DATA_DATA {
25385    fn default() -> Self {
25386        Self::DEFAULT.clone()
25387    }
25388}
25389impl MessageData for LOGGING_DATA_DATA {
25390    type Message = MavMessage;
25391    const ID: u32 = 266u32;
25392    const NAME: &'static str = "LOGGING_DATA";
25393    const EXTRA_CRC: u8 = 193u8;
25394    const ENCODED_LEN: usize = 255usize;
25395    fn deser(
25396        _version: MavlinkVersion,
25397        __input: &[u8],
25398    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25399        let avail_len = __input.len();
25400        let mut payload_buf = [0; Self::ENCODED_LEN];
25401        let mut buf = if avail_len < Self::ENCODED_LEN {
25402            payload_buf[0..avail_len].copy_from_slice(__input);
25403            Bytes::new(&payload_buf)
25404        } else {
25405            Bytes::new(__input)
25406        };
25407        let mut __struct = Self::default();
25408        __struct.sequence = buf.get_u16_le()?;
25409        __struct.target_system = buf.get_u8()?;
25410        __struct.target_component = buf.get_u8()?;
25411        __struct.length = buf.get_u8()?;
25412        __struct.first_message_offset = buf.get_u8()?;
25413        for v in &mut __struct.data {
25414            let val = buf.get_u8()?;
25415            *v = val;
25416        }
25417        Ok(__struct)
25418    }
25419    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25420        let mut __tmp = BytesMut::new(bytes);
25421        #[allow(clippy::absurd_extreme_comparisons)]
25422        #[allow(unused_comparisons)]
25423        if __tmp.remaining() < Self::ENCODED_LEN {
25424            panic!(
25425                "buffer is too small (need {} bytes, but got {})",
25426                Self::ENCODED_LEN,
25427                __tmp.remaining(),
25428            )
25429        }
25430        __tmp.put_u16_le(self.sequence);
25431        __tmp.put_u8(self.target_system);
25432        __tmp.put_u8(self.target_component);
25433        __tmp.put_u8(self.length);
25434        __tmp.put_u8(self.first_message_offset);
25435        for val in &self.data {
25436            __tmp.put_u8(*val);
25437        }
25438        if matches!(version, MavlinkVersion::V2) {
25439            let len = __tmp.len();
25440            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25441        } else {
25442            __tmp.len()
25443        }
25444    }
25445}
25446#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
25447#[doc = ""]
25448#[doc = "ID: 267"]
25449#[derive(Debug, Clone, PartialEq)]
25450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25452#[cfg_attr(feature = "ts", derive(TS))]
25453#[cfg_attr(feature = "ts", ts(export))]
25454pub struct LOGGING_DATA_ACKED_DATA {
25455    #[doc = "sequence number (can wrap)"]
25456    pub sequence: u16,
25457    #[doc = "system ID of the target"]
25458    pub target_system: u8,
25459    #[doc = "component ID of the target"]
25460    pub target_component: u8,
25461    #[doc = "data length"]
25462    pub length: u8,
25463    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
25464    pub first_message_offset: u8,
25465    #[doc = "logged data"]
25466    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25467    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25468    pub data: [u8; 249],
25469}
25470impl LOGGING_DATA_ACKED_DATA {
25471    pub const ENCODED_LEN: usize = 255usize;
25472    pub const DEFAULT: Self = Self {
25473        sequence: 0_u16,
25474        target_system: 0_u8,
25475        target_component: 0_u8,
25476        length: 0_u8,
25477        first_message_offset: 0_u8,
25478        data: [0_u8; 249usize],
25479    };
25480    #[cfg(feature = "arbitrary")]
25481    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25482        use arbitrary::{Arbitrary, Unstructured};
25483        let mut buf = [0u8; 1024];
25484        rng.fill_bytes(&mut buf);
25485        let mut unstructured = Unstructured::new(&buf);
25486        Self::arbitrary(&mut unstructured).unwrap_or_default()
25487    }
25488}
25489impl Default for LOGGING_DATA_ACKED_DATA {
25490    fn default() -> Self {
25491        Self::DEFAULT.clone()
25492    }
25493}
25494impl MessageData for LOGGING_DATA_ACKED_DATA {
25495    type Message = MavMessage;
25496    const ID: u32 = 267u32;
25497    const NAME: &'static str = "LOGGING_DATA_ACKED";
25498    const EXTRA_CRC: u8 = 35u8;
25499    const ENCODED_LEN: usize = 255usize;
25500    fn deser(
25501        _version: MavlinkVersion,
25502        __input: &[u8],
25503    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25504        let avail_len = __input.len();
25505        let mut payload_buf = [0; Self::ENCODED_LEN];
25506        let mut buf = if avail_len < Self::ENCODED_LEN {
25507            payload_buf[0..avail_len].copy_from_slice(__input);
25508            Bytes::new(&payload_buf)
25509        } else {
25510            Bytes::new(__input)
25511        };
25512        let mut __struct = Self::default();
25513        __struct.sequence = buf.get_u16_le()?;
25514        __struct.target_system = buf.get_u8()?;
25515        __struct.target_component = buf.get_u8()?;
25516        __struct.length = buf.get_u8()?;
25517        __struct.first_message_offset = buf.get_u8()?;
25518        for v in &mut __struct.data {
25519            let val = buf.get_u8()?;
25520            *v = val;
25521        }
25522        Ok(__struct)
25523    }
25524    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25525        let mut __tmp = BytesMut::new(bytes);
25526        #[allow(clippy::absurd_extreme_comparisons)]
25527        #[allow(unused_comparisons)]
25528        if __tmp.remaining() < Self::ENCODED_LEN {
25529            panic!(
25530                "buffer is too small (need {} bytes, but got {})",
25531                Self::ENCODED_LEN,
25532                __tmp.remaining(),
25533            )
25534        }
25535        __tmp.put_u16_le(self.sequence);
25536        __tmp.put_u8(self.target_system);
25537        __tmp.put_u8(self.target_component);
25538        __tmp.put_u8(self.length);
25539        __tmp.put_u8(self.first_message_offset);
25540        for val in &self.data {
25541            __tmp.put_u8(*val);
25542        }
25543        if matches!(version, MavlinkVersion::V2) {
25544            let len = __tmp.len();
25545            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25546        } else {
25547            __tmp.len()
25548        }
25549    }
25550}
25551#[doc = "Reply to LOG_REQUEST_DATA."]
25552#[doc = ""]
25553#[doc = "ID: 120"]
25554#[derive(Debug, Clone, PartialEq)]
25555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25557#[cfg_attr(feature = "ts", derive(TS))]
25558#[cfg_attr(feature = "ts", ts(export))]
25559pub struct LOG_DATA_DATA {
25560    #[doc = "Offset into the log"]
25561    pub ofs: u32,
25562    #[doc = "Log id (from LOG_ENTRY reply)"]
25563    pub id: u16,
25564    #[doc = "Number of bytes (zero for end of log)"]
25565    pub count: u8,
25566    #[doc = "log data"]
25567    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25568    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25569    pub data: [u8; 90],
25570}
25571impl LOG_DATA_DATA {
25572    pub const ENCODED_LEN: usize = 97usize;
25573    pub const DEFAULT: Self = Self {
25574        ofs: 0_u32,
25575        id: 0_u16,
25576        count: 0_u8,
25577        data: [0_u8; 90usize],
25578    };
25579    #[cfg(feature = "arbitrary")]
25580    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25581        use arbitrary::{Arbitrary, Unstructured};
25582        let mut buf = [0u8; 1024];
25583        rng.fill_bytes(&mut buf);
25584        let mut unstructured = Unstructured::new(&buf);
25585        Self::arbitrary(&mut unstructured).unwrap_or_default()
25586    }
25587}
25588impl Default for LOG_DATA_DATA {
25589    fn default() -> Self {
25590        Self::DEFAULT.clone()
25591    }
25592}
25593impl MessageData for LOG_DATA_DATA {
25594    type Message = MavMessage;
25595    const ID: u32 = 120u32;
25596    const NAME: &'static str = "LOG_DATA";
25597    const EXTRA_CRC: u8 = 134u8;
25598    const ENCODED_LEN: usize = 97usize;
25599    fn deser(
25600        _version: MavlinkVersion,
25601        __input: &[u8],
25602    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25603        let avail_len = __input.len();
25604        let mut payload_buf = [0; Self::ENCODED_LEN];
25605        let mut buf = if avail_len < Self::ENCODED_LEN {
25606            payload_buf[0..avail_len].copy_from_slice(__input);
25607            Bytes::new(&payload_buf)
25608        } else {
25609            Bytes::new(__input)
25610        };
25611        let mut __struct = Self::default();
25612        __struct.ofs = buf.get_u32_le()?;
25613        __struct.id = buf.get_u16_le()?;
25614        __struct.count = buf.get_u8()?;
25615        for v in &mut __struct.data {
25616            let val = buf.get_u8()?;
25617            *v = val;
25618        }
25619        Ok(__struct)
25620    }
25621    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25622        let mut __tmp = BytesMut::new(bytes);
25623        #[allow(clippy::absurd_extreme_comparisons)]
25624        #[allow(unused_comparisons)]
25625        if __tmp.remaining() < Self::ENCODED_LEN {
25626            panic!(
25627                "buffer is too small (need {} bytes, but got {})",
25628                Self::ENCODED_LEN,
25629                __tmp.remaining(),
25630            )
25631        }
25632        __tmp.put_u32_le(self.ofs);
25633        __tmp.put_u16_le(self.id);
25634        __tmp.put_u8(self.count);
25635        for val in &self.data {
25636            __tmp.put_u8(*val);
25637        }
25638        if matches!(version, MavlinkVersion::V2) {
25639            let len = __tmp.len();
25640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25641        } else {
25642            __tmp.len()
25643        }
25644    }
25645}
25646#[doc = "Reply to LOG_REQUEST_LIST."]
25647#[doc = ""]
25648#[doc = "ID: 118"]
25649#[derive(Debug, Clone, PartialEq)]
25650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25652#[cfg_attr(feature = "ts", derive(TS))]
25653#[cfg_attr(feature = "ts", ts(export))]
25654pub struct LOG_ENTRY_DATA {
25655    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
25656    pub time_utc: u32,
25657    #[doc = "Size of the log (may be approximate)"]
25658    pub size: u32,
25659    #[doc = "Log id"]
25660    pub id: u16,
25661    #[doc = "Total number of logs"]
25662    pub num_logs: u16,
25663    #[doc = "High log number"]
25664    pub last_log_num: u16,
25665}
25666impl LOG_ENTRY_DATA {
25667    pub const ENCODED_LEN: usize = 14usize;
25668    pub const DEFAULT: Self = Self {
25669        time_utc: 0_u32,
25670        size: 0_u32,
25671        id: 0_u16,
25672        num_logs: 0_u16,
25673        last_log_num: 0_u16,
25674    };
25675    #[cfg(feature = "arbitrary")]
25676    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25677        use arbitrary::{Arbitrary, Unstructured};
25678        let mut buf = [0u8; 1024];
25679        rng.fill_bytes(&mut buf);
25680        let mut unstructured = Unstructured::new(&buf);
25681        Self::arbitrary(&mut unstructured).unwrap_or_default()
25682    }
25683}
25684impl Default for LOG_ENTRY_DATA {
25685    fn default() -> Self {
25686        Self::DEFAULT.clone()
25687    }
25688}
25689impl MessageData for LOG_ENTRY_DATA {
25690    type Message = MavMessage;
25691    const ID: u32 = 118u32;
25692    const NAME: &'static str = "LOG_ENTRY";
25693    const EXTRA_CRC: u8 = 56u8;
25694    const ENCODED_LEN: usize = 14usize;
25695    fn deser(
25696        _version: MavlinkVersion,
25697        __input: &[u8],
25698    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25699        let avail_len = __input.len();
25700        let mut payload_buf = [0; Self::ENCODED_LEN];
25701        let mut buf = if avail_len < Self::ENCODED_LEN {
25702            payload_buf[0..avail_len].copy_from_slice(__input);
25703            Bytes::new(&payload_buf)
25704        } else {
25705            Bytes::new(__input)
25706        };
25707        let mut __struct = Self::default();
25708        __struct.time_utc = buf.get_u32_le()?;
25709        __struct.size = buf.get_u32_le()?;
25710        __struct.id = buf.get_u16_le()?;
25711        __struct.num_logs = buf.get_u16_le()?;
25712        __struct.last_log_num = buf.get_u16_le()?;
25713        Ok(__struct)
25714    }
25715    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25716        let mut __tmp = BytesMut::new(bytes);
25717        #[allow(clippy::absurd_extreme_comparisons)]
25718        #[allow(unused_comparisons)]
25719        if __tmp.remaining() < Self::ENCODED_LEN {
25720            panic!(
25721                "buffer is too small (need {} bytes, but got {})",
25722                Self::ENCODED_LEN,
25723                __tmp.remaining(),
25724            )
25725        }
25726        __tmp.put_u32_le(self.time_utc);
25727        __tmp.put_u32_le(self.size);
25728        __tmp.put_u16_le(self.id);
25729        __tmp.put_u16_le(self.num_logs);
25730        __tmp.put_u16_le(self.last_log_num);
25731        if matches!(version, MavlinkVersion::V2) {
25732            let len = __tmp.len();
25733            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25734        } else {
25735            __tmp.len()
25736        }
25737    }
25738}
25739#[doc = "Erase all logs."]
25740#[doc = ""]
25741#[doc = "ID: 121"]
25742#[derive(Debug, Clone, PartialEq)]
25743#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25744#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25745#[cfg_attr(feature = "ts", derive(TS))]
25746#[cfg_attr(feature = "ts", ts(export))]
25747pub struct LOG_ERASE_DATA {
25748    #[doc = "System ID"]
25749    pub target_system: u8,
25750    #[doc = "Component ID"]
25751    pub target_component: u8,
25752}
25753impl LOG_ERASE_DATA {
25754    pub const ENCODED_LEN: usize = 2usize;
25755    pub const DEFAULT: Self = Self {
25756        target_system: 0_u8,
25757        target_component: 0_u8,
25758    };
25759    #[cfg(feature = "arbitrary")]
25760    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25761        use arbitrary::{Arbitrary, Unstructured};
25762        let mut buf = [0u8; 1024];
25763        rng.fill_bytes(&mut buf);
25764        let mut unstructured = Unstructured::new(&buf);
25765        Self::arbitrary(&mut unstructured).unwrap_or_default()
25766    }
25767}
25768impl Default for LOG_ERASE_DATA {
25769    fn default() -> Self {
25770        Self::DEFAULT.clone()
25771    }
25772}
25773impl MessageData for LOG_ERASE_DATA {
25774    type Message = MavMessage;
25775    const ID: u32 = 121u32;
25776    const NAME: &'static str = "LOG_ERASE";
25777    const EXTRA_CRC: u8 = 237u8;
25778    const ENCODED_LEN: usize = 2usize;
25779    fn deser(
25780        _version: MavlinkVersion,
25781        __input: &[u8],
25782    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25783        let avail_len = __input.len();
25784        let mut payload_buf = [0; Self::ENCODED_LEN];
25785        let mut buf = if avail_len < Self::ENCODED_LEN {
25786            payload_buf[0..avail_len].copy_from_slice(__input);
25787            Bytes::new(&payload_buf)
25788        } else {
25789            Bytes::new(__input)
25790        };
25791        let mut __struct = Self::default();
25792        __struct.target_system = buf.get_u8()?;
25793        __struct.target_component = buf.get_u8()?;
25794        Ok(__struct)
25795    }
25796    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25797        let mut __tmp = BytesMut::new(bytes);
25798        #[allow(clippy::absurd_extreme_comparisons)]
25799        #[allow(unused_comparisons)]
25800        if __tmp.remaining() < Self::ENCODED_LEN {
25801            panic!(
25802                "buffer is too small (need {} bytes, but got {})",
25803                Self::ENCODED_LEN,
25804                __tmp.remaining(),
25805            )
25806        }
25807        __tmp.put_u8(self.target_system);
25808        __tmp.put_u8(self.target_component);
25809        if matches!(version, MavlinkVersion::V2) {
25810            let len = __tmp.len();
25811            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25812        } else {
25813            __tmp.len()
25814        }
25815    }
25816}
25817#[doc = "Request a chunk of a log."]
25818#[doc = ""]
25819#[doc = "ID: 119"]
25820#[derive(Debug, Clone, PartialEq)]
25821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25823#[cfg_attr(feature = "ts", derive(TS))]
25824#[cfg_attr(feature = "ts", ts(export))]
25825pub struct LOG_REQUEST_DATA_DATA {
25826    #[doc = "Offset into the log"]
25827    pub ofs: u32,
25828    #[doc = "Number of bytes"]
25829    pub count: u32,
25830    #[doc = "Log id (from LOG_ENTRY reply)"]
25831    pub id: u16,
25832    #[doc = "System ID"]
25833    pub target_system: u8,
25834    #[doc = "Component ID"]
25835    pub target_component: u8,
25836}
25837impl LOG_REQUEST_DATA_DATA {
25838    pub const ENCODED_LEN: usize = 12usize;
25839    pub const DEFAULT: Self = Self {
25840        ofs: 0_u32,
25841        count: 0_u32,
25842        id: 0_u16,
25843        target_system: 0_u8,
25844        target_component: 0_u8,
25845    };
25846    #[cfg(feature = "arbitrary")]
25847    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25848        use arbitrary::{Arbitrary, Unstructured};
25849        let mut buf = [0u8; 1024];
25850        rng.fill_bytes(&mut buf);
25851        let mut unstructured = Unstructured::new(&buf);
25852        Self::arbitrary(&mut unstructured).unwrap_or_default()
25853    }
25854}
25855impl Default for LOG_REQUEST_DATA_DATA {
25856    fn default() -> Self {
25857        Self::DEFAULT.clone()
25858    }
25859}
25860impl MessageData for LOG_REQUEST_DATA_DATA {
25861    type Message = MavMessage;
25862    const ID: u32 = 119u32;
25863    const NAME: &'static str = "LOG_REQUEST_DATA";
25864    const EXTRA_CRC: u8 = 116u8;
25865    const ENCODED_LEN: usize = 12usize;
25866    fn deser(
25867        _version: MavlinkVersion,
25868        __input: &[u8],
25869    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25870        let avail_len = __input.len();
25871        let mut payload_buf = [0; Self::ENCODED_LEN];
25872        let mut buf = if avail_len < Self::ENCODED_LEN {
25873            payload_buf[0..avail_len].copy_from_slice(__input);
25874            Bytes::new(&payload_buf)
25875        } else {
25876            Bytes::new(__input)
25877        };
25878        let mut __struct = Self::default();
25879        __struct.ofs = buf.get_u32_le()?;
25880        __struct.count = buf.get_u32_le()?;
25881        __struct.id = buf.get_u16_le()?;
25882        __struct.target_system = buf.get_u8()?;
25883        __struct.target_component = buf.get_u8()?;
25884        Ok(__struct)
25885    }
25886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25887        let mut __tmp = BytesMut::new(bytes);
25888        #[allow(clippy::absurd_extreme_comparisons)]
25889        #[allow(unused_comparisons)]
25890        if __tmp.remaining() < Self::ENCODED_LEN {
25891            panic!(
25892                "buffer is too small (need {} bytes, but got {})",
25893                Self::ENCODED_LEN,
25894                __tmp.remaining(),
25895            )
25896        }
25897        __tmp.put_u32_le(self.ofs);
25898        __tmp.put_u32_le(self.count);
25899        __tmp.put_u16_le(self.id);
25900        __tmp.put_u8(self.target_system);
25901        __tmp.put_u8(self.target_component);
25902        if matches!(version, MavlinkVersion::V2) {
25903            let len = __tmp.len();
25904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25905        } else {
25906            __tmp.len()
25907        }
25908    }
25909}
25910#[doc = "Stop log transfer and resume normal logging."]
25911#[doc = ""]
25912#[doc = "ID: 122"]
25913#[derive(Debug, Clone, PartialEq)]
25914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25916#[cfg_attr(feature = "ts", derive(TS))]
25917#[cfg_attr(feature = "ts", ts(export))]
25918pub struct LOG_REQUEST_END_DATA {
25919    #[doc = "System ID"]
25920    pub target_system: u8,
25921    #[doc = "Component ID"]
25922    pub target_component: u8,
25923}
25924impl LOG_REQUEST_END_DATA {
25925    pub const ENCODED_LEN: usize = 2usize;
25926    pub const DEFAULT: Self = Self {
25927        target_system: 0_u8,
25928        target_component: 0_u8,
25929    };
25930    #[cfg(feature = "arbitrary")]
25931    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25932        use arbitrary::{Arbitrary, Unstructured};
25933        let mut buf = [0u8; 1024];
25934        rng.fill_bytes(&mut buf);
25935        let mut unstructured = Unstructured::new(&buf);
25936        Self::arbitrary(&mut unstructured).unwrap_or_default()
25937    }
25938}
25939impl Default for LOG_REQUEST_END_DATA {
25940    fn default() -> Self {
25941        Self::DEFAULT.clone()
25942    }
25943}
25944impl MessageData for LOG_REQUEST_END_DATA {
25945    type Message = MavMessage;
25946    const ID: u32 = 122u32;
25947    const NAME: &'static str = "LOG_REQUEST_END";
25948    const EXTRA_CRC: u8 = 203u8;
25949    const ENCODED_LEN: usize = 2usize;
25950    fn deser(
25951        _version: MavlinkVersion,
25952        __input: &[u8],
25953    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25954        let avail_len = __input.len();
25955        let mut payload_buf = [0; Self::ENCODED_LEN];
25956        let mut buf = if avail_len < Self::ENCODED_LEN {
25957            payload_buf[0..avail_len].copy_from_slice(__input);
25958            Bytes::new(&payload_buf)
25959        } else {
25960            Bytes::new(__input)
25961        };
25962        let mut __struct = Self::default();
25963        __struct.target_system = buf.get_u8()?;
25964        __struct.target_component = buf.get_u8()?;
25965        Ok(__struct)
25966    }
25967    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25968        let mut __tmp = BytesMut::new(bytes);
25969        #[allow(clippy::absurd_extreme_comparisons)]
25970        #[allow(unused_comparisons)]
25971        if __tmp.remaining() < Self::ENCODED_LEN {
25972            panic!(
25973                "buffer is too small (need {} bytes, but got {})",
25974                Self::ENCODED_LEN,
25975                __tmp.remaining(),
25976            )
25977        }
25978        __tmp.put_u8(self.target_system);
25979        __tmp.put_u8(self.target_component);
25980        if matches!(version, MavlinkVersion::V2) {
25981            let len = __tmp.len();
25982            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25983        } else {
25984            __tmp.len()
25985        }
25986    }
25987}
25988#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
25989#[doc = ""]
25990#[doc = "ID: 117"]
25991#[derive(Debug, Clone, PartialEq)]
25992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25994#[cfg_attr(feature = "ts", derive(TS))]
25995#[cfg_attr(feature = "ts", ts(export))]
25996pub struct LOG_REQUEST_LIST_DATA {
25997    #[doc = "First log id (0 for first available)"]
25998    pub start: u16,
25999    #[doc = "Last log id (0xffff for last available)"]
26000    pub end: u16,
26001    #[doc = "System ID"]
26002    pub target_system: u8,
26003    #[doc = "Component ID"]
26004    pub target_component: u8,
26005}
26006impl LOG_REQUEST_LIST_DATA {
26007    pub const ENCODED_LEN: usize = 6usize;
26008    pub const DEFAULT: Self = Self {
26009        start: 0_u16,
26010        end: 0_u16,
26011        target_system: 0_u8,
26012        target_component: 0_u8,
26013    };
26014    #[cfg(feature = "arbitrary")]
26015    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26016        use arbitrary::{Arbitrary, Unstructured};
26017        let mut buf = [0u8; 1024];
26018        rng.fill_bytes(&mut buf);
26019        let mut unstructured = Unstructured::new(&buf);
26020        Self::arbitrary(&mut unstructured).unwrap_or_default()
26021    }
26022}
26023impl Default for LOG_REQUEST_LIST_DATA {
26024    fn default() -> Self {
26025        Self::DEFAULT.clone()
26026    }
26027}
26028impl MessageData for LOG_REQUEST_LIST_DATA {
26029    type Message = MavMessage;
26030    const ID: u32 = 117u32;
26031    const NAME: &'static str = "LOG_REQUEST_LIST";
26032    const EXTRA_CRC: u8 = 128u8;
26033    const ENCODED_LEN: usize = 6usize;
26034    fn deser(
26035        _version: MavlinkVersion,
26036        __input: &[u8],
26037    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26038        let avail_len = __input.len();
26039        let mut payload_buf = [0; Self::ENCODED_LEN];
26040        let mut buf = if avail_len < Self::ENCODED_LEN {
26041            payload_buf[0..avail_len].copy_from_slice(__input);
26042            Bytes::new(&payload_buf)
26043        } else {
26044            Bytes::new(__input)
26045        };
26046        let mut __struct = Self::default();
26047        __struct.start = buf.get_u16_le()?;
26048        __struct.end = buf.get_u16_le()?;
26049        __struct.target_system = buf.get_u8()?;
26050        __struct.target_component = buf.get_u8()?;
26051        Ok(__struct)
26052    }
26053    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26054        let mut __tmp = BytesMut::new(bytes);
26055        #[allow(clippy::absurd_extreme_comparisons)]
26056        #[allow(unused_comparisons)]
26057        if __tmp.remaining() < Self::ENCODED_LEN {
26058            panic!(
26059                "buffer is too small (need {} bytes, but got {})",
26060                Self::ENCODED_LEN,
26061                __tmp.remaining(),
26062            )
26063        }
26064        __tmp.put_u16_le(self.start);
26065        __tmp.put_u16_le(self.end);
26066        __tmp.put_u8(self.target_system);
26067        __tmp.put_u8(self.target_component);
26068        if matches!(version, MavlinkVersion::V2) {
26069            let len = __tmp.len();
26070            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26071        } else {
26072            __tmp.len()
26073        }
26074    }
26075}
26076#[doc = "Composite EFI and Governor data from Loweheiser equipment.  This message is created by the EFI unit based on its own data and data received from a governor attached to that EFI unit."]
26077#[doc = ""]
26078#[doc = "ID: 10151"]
26079#[derive(Debug, Clone, PartialEq)]
26080#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26081#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26082#[cfg_attr(feature = "ts", derive(TS))]
26083#[cfg_attr(feature = "ts", ts(export))]
26084pub struct LOWEHEISER_GOV_EFI_DATA {
26085    #[doc = "Generator Battery voltage."]
26086    pub volt_batt: f32,
26087    #[doc = "Generator Battery current."]
26088    pub curr_batt: f32,
26089    #[doc = "Current being produced by generator."]
26090    pub curr_gen: f32,
26091    #[doc = "Load current being consumed by the UAV (sum of curr_gen and curr_batt)"]
26092    pub curr_rot: f32,
26093    #[doc = "Generator fuel remaining in litres."]
26094    pub fuel_level: f32,
26095    #[doc = "Throttle Output."]
26096    pub throttle: f32,
26097    #[doc = "Seconds this generator has run since it was rebooted."]
26098    pub runtime: u32,
26099    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past due."]
26100    pub until_maintenance: i32,
26101    #[doc = "The Temperature of the rectifier."]
26102    pub rectifier_temp: f32,
26103    #[doc = "The temperature of the mechanical motor, fuel cell core or generator."]
26104    pub generator_temp: f32,
26105    #[doc = "EFI Supply Voltage."]
26106    pub efi_batt: f32,
26107    #[doc = "Motor RPM."]
26108    pub efi_rpm: f32,
26109    #[doc = "Injector pulse-width in miliseconds."]
26110    pub efi_pw: f32,
26111    #[doc = "Fuel flow rate in litres/hour."]
26112    pub efi_fuel_flow: f32,
26113    #[doc = "Fuel consumed."]
26114    pub efi_fuel_consumed: f32,
26115    #[doc = "Atmospheric pressure."]
26116    pub efi_baro: f32,
26117    #[doc = "Manifold Air Temperature."]
26118    pub efi_mat: f32,
26119    #[doc = "Cylinder Head Temperature."]
26120    pub efi_clt: f32,
26121    #[doc = "Throttle Position."]
26122    pub efi_tps: f32,
26123    #[doc = "Exhaust gas temperature."]
26124    pub efi_exhaust_gas_temperature: f32,
26125    #[doc = "Generator status."]
26126    pub generator_status: u16,
26127    #[doc = "EFI status."]
26128    pub efi_status: u16,
26129    #[doc = "EFI index."]
26130    pub efi_index: u8,
26131}
26132impl LOWEHEISER_GOV_EFI_DATA {
26133    pub const ENCODED_LEN: usize = 85usize;
26134    pub const DEFAULT: Self = Self {
26135        volt_batt: 0.0_f32,
26136        curr_batt: 0.0_f32,
26137        curr_gen: 0.0_f32,
26138        curr_rot: 0.0_f32,
26139        fuel_level: 0.0_f32,
26140        throttle: 0.0_f32,
26141        runtime: 0_u32,
26142        until_maintenance: 0_i32,
26143        rectifier_temp: 0.0_f32,
26144        generator_temp: 0.0_f32,
26145        efi_batt: 0.0_f32,
26146        efi_rpm: 0.0_f32,
26147        efi_pw: 0.0_f32,
26148        efi_fuel_flow: 0.0_f32,
26149        efi_fuel_consumed: 0.0_f32,
26150        efi_baro: 0.0_f32,
26151        efi_mat: 0.0_f32,
26152        efi_clt: 0.0_f32,
26153        efi_tps: 0.0_f32,
26154        efi_exhaust_gas_temperature: 0.0_f32,
26155        generator_status: 0_u16,
26156        efi_status: 0_u16,
26157        efi_index: 0_u8,
26158    };
26159    #[cfg(feature = "arbitrary")]
26160    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26161        use arbitrary::{Arbitrary, Unstructured};
26162        let mut buf = [0u8; 1024];
26163        rng.fill_bytes(&mut buf);
26164        let mut unstructured = Unstructured::new(&buf);
26165        Self::arbitrary(&mut unstructured).unwrap_or_default()
26166    }
26167}
26168impl Default for LOWEHEISER_GOV_EFI_DATA {
26169    fn default() -> Self {
26170        Self::DEFAULT.clone()
26171    }
26172}
26173impl MessageData for LOWEHEISER_GOV_EFI_DATA {
26174    type Message = MavMessage;
26175    const ID: u32 = 10151u32;
26176    const NAME: &'static str = "LOWEHEISER_GOV_EFI";
26177    const EXTRA_CRC: u8 = 195u8;
26178    const ENCODED_LEN: usize = 85usize;
26179    fn deser(
26180        _version: MavlinkVersion,
26181        __input: &[u8],
26182    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26183        let avail_len = __input.len();
26184        let mut payload_buf = [0; Self::ENCODED_LEN];
26185        let mut buf = if avail_len < Self::ENCODED_LEN {
26186            payload_buf[0..avail_len].copy_from_slice(__input);
26187            Bytes::new(&payload_buf)
26188        } else {
26189            Bytes::new(__input)
26190        };
26191        let mut __struct = Self::default();
26192        __struct.volt_batt = buf.get_f32_le()?;
26193        __struct.curr_batt = buf.get_f32_le()?;
26194        __struct.curr_gen = buf.get_f32_le()?;
26195        __struct.curr_rot = buf.get_f32_le()?;
26196        __struct.fuel_level = buf.get_f32_le()?;
26197        __struct.throttle = buf.get_f32_le()?;
26198        __struct.runtime = buf.get_u32_le()?;
26199        __struct.until_maintenance = buf.get_i32_le()?;
26200        __struct.rectifier_temp = buf.get_f32_le()?;
26201        __struct.generator_temp = buf.get_f32_le()?;
26202        __struct.efi_batt = buf.get_f32_le()?;
26203        __struct.efi_rpm = buf.get_f32_le()?;
26204        __struct.efi_pw = buf.get_f32_le()?;
26205        __struct.efi_fuel_flow = buf.get_f32_le()?;
26206        __struct.efi_fuel_consumed = buf.get_f32_le()?;
26207        __struct.efi_baro = buf.get_f32_le()?;
26208        __struct.efi_mat = buf.get_f32_le()?;
26209        __struct.efi_clt = buf.get_f32_le()?;
26210        __struct.efi_tps = buf.get_f32_le()?;
26211        __struct.efi_exhaust_gas_temperature = buf.get_f32_le()?;
26212        __struct.generator_status = buf.get_u16_le()?;
26213        __struct.efi_status = buf.get_u16_le()?;
26214        __struct.efi_index = buf.get_u8()?;
26215        Ok(__struct)
26216    }
26217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26218        let mut __tmp = BytesMut::new(bytes);
26219        #[allow(clippy::absurd_extreme_comparisons)]
26220        #[allow(unused_comparisons)]
26221        if __tmp.remaining() < Self::ENCODED_LEN {
26222            panic!(
26223                "buffer is too small (need {} bytes, but got {})",
26224                Self::ENCODED_LEN,
26225                __tmp.remaining(),
26226            )
26227        }
26228        __tmp.put_f32_le(self.volt_batt);
26229        __tmp.put_f32_le(self.curr_batt);
26230        __tmp.put_f32_le(self.curr_gen);
26231        __tmp.put_f32_le(self.curr_rot);
26232        __tmp.put_f32_le(self.fuel_level);
26233        __tmp.put_f32_le(self.throttle);
26234        __tmp.put_u32_le(self.runtime);
26235        __tmp.put_i32_le(self.until_maintenance);
26236        __tmp.put_f32_le(self.rectifier_temp);
26237        __tmp.put_f32_le(self.generator_temp);
26238        __tmp.put_f32_le(self.efi_batt);
26239        __tmp.put_f32_le(self.efi_rpm);
26240        __tmp.put_f32_le(self.efi_pw);
26241        __tmp.put_f32_le(self.efi_fuel_flow);
26242        __tmp.put_f32_le(self.efi_fuel_consumed);
26243        __tmp.put_f32_le(self.efi_baro);
26244        __tmp.put_f32_le(self.efi_mat);
26245        __tmp.put_f32_le(self.efi_clt);
26246        __tmp.put_f32_le(self.efi_tps);
26247        __tmp.put_f32_le(self.efi_exhaust_gas_temperature);
26248        __tmp.put_u16_le(self.generator_status);
26249        __tmp.put_u16_le(self.efi_status);
26250        __tmp.put_u8(self.efi_index);
26251        if matches!(version, MavlinkVersion::V2) {
26252            let len = __tmp.len();
26253            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26254        } else {
26255            __tmp.len()
26256        }
26257    }
26258}
26259#[doc = "Reports progress of compass calibration."]
26260#[doc = ""]
26261#[doc = "ID: 191"]
26262#[derive(Debug, Clone, PartialEq)]
26263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26265#[cfg_attr(feature = "ts", derive(TS))]
26266#[cfg_attr(feature = "ts", ts(export))]
26267pub struct MAG_CAL_PROGRESS_DATA {
26268    #[doc = "Body frame direction vector for display."]
26269    pub direction_x: f32,
26270    #[doc = "Body frame direction vector for display."]
26271    pub direction_y: f32,
26272    #[doc = "Body frame direction vector for display."]
26273    pub direction_z: f32,
26274    #[doc = "Compass being calibrated."]
26275    pub compass_id: u8,
26276    #[doc = "Bitmask of compasses being calibrated."]
26277    pub cal_mask: u8,
26278    #[doc = "Calibration Status."]
26279    pub cal_status: MagCalStatus,
26280    #[doc = "Attempt number."]
26281    pub attempt: u8,
26282    #[doc = "Completion percentage."]
26283    pub completion_pct: u8,
26284    #[doc = "Bitmask of sphere sections (see <http://en.wikipedia.org/wiki/Geodesic_grid>)."]
26285    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26286    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26287    pub completion_mask: [u8; 10],
26288}
26289impl MAG_CAL_PROGRESS_DATA {
26290    pub const ENCODED_LEN: usize = 27usize;
26291    pub const DEFAULT: Self = Self {
26292        direction_x: 0.0_f32,
26293        direction_y: 0.0_f32,
26294        direction_z: 0.0_f32,
26295        compass_id: 0_u8,
26296        cal_mask: 0_u8,
26297        cal_status: MagCalStatus::DEFAULT,
26298        attempt: 0_u8,
26299        completion_pct: 0_u8,
26300        completion_mask: [0_u8; 10usize],
26301    };
26302    #[cfg(feature = "arbitrary")]
26303    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26304        use arbitrary::{Arbitrary, Unstructured};
26305        let mut buf = [0u8; 1024];
26306        rng.fill_bytes(&mut buf);
26307        let mut unstructured = Unstructured::new(&buf);
26308        Self::arbitrary(&mut unstructured).unwrap_or_default()
26309    }
26310}
26311impl Default for MAG_CAL_PROGRESS_DATA {
26312    fn default() -> Self {
26313        Self::DEFAULT.clone()
26314    }
26315}
26316impl MessageData for MAG_CAL_PROGRESS_DATA {
26317    type Message = MavMessage;
26318    const ID: u32 = 191u32;
26319    const NAME: &'static str = "MAG_CAL_PROGRESS";
26320    const EXTRA_CRC: u8 = 92u8;
26321    const ENCODED_LEN: usize = 27usize;
26322    fn deser(
26323        _version: MavlinkVersion,
26324        __input: &[u8],
26325    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26326        let avail_len = __input.len();
26327        let mut payload_buf = [0; Self::ENCODED_LEN];
26328        let mut buf = if avail_len < Self::ENCODED_LEN {
26329            payload_buf[0..avail_len].copy_from_slice(__input);
26330            Bytes::new(&payload_buf)
26331        } else {
26332            Bytes::new(__input)
26333        };
26334        let mut __struct = Self::default();
26335        __struct.direction_x = buf.get_f32_le()?;
26336        __struct.direction_y = buf.get_f32_le()?;
26337        __struct.direction_z = buf.get_f32_le()?;
26338        __struct.compass_id = buf.get_u8()?;
26339        __struct.cal_mask = buf.get_u8()?;
26340        let tmp = buf.get_u8()?;
26341        __struct.cal_status =
26342            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26343                enum_type: "MagCalStatus",
26344                value: tmp as u64,
26345            })?;
26346        __struct.attempt = buf.get_u8()?;
26347        __struct.completion_pct = buf.get_u8()?;
26348        for v in &mut __struct.completion_mask {
26349            let val = buf.get_u8()?;
26350            *v = val;
26351        }
26352        Ok(__struct)
26353    }
26354    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26355        let mut __tmp = BytesMut::new(bytes);
26356        #[allow(clippy::absurd_extreme_comparisons)]
26357        #[allow(unused_comparisons)]
26358        if __tmp.remaining() < Self::ENCODED_LEN {
26359            panic!(
26360                "buffer is too small (need {} bytes, but got {})",
26361                Self::ENCODED_LEN,
26362                __tmp.remaining(),
26363            )
26364        }
26365        __tmp.put_f32_le(self.direction_x);
26366        __tmp.put_f32_le(self.direction_y);
26367        __tmp.put_f32_le(self.direction_z);
26368        __tmp.put_u8(self.compass_id);
26369        __tmp.put_u8(self.cal_mask);
26370        __tmp.put_u8(self.cal_status as u8);
26371        __tmp.put_u8(self.attempt);
26372        __tmp.put_u8(self.completion_pct);
26373        for val in &self.completion_mask {
26374            __tmp.put_u8(*val);
26375        }
26376        if matches!(version, MavlinkVersion::V2) {
26377            let len = __tmp.len();
26378            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26379        } else {
26380            __tmp.len()
26381        }
26382    }
26383}
26384#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
26385#[doc = ""]
26386#[doc = "ID: 192"]
26387#[derive(Debug, Clone, PartialEq)]
26388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26390#[cfg_attr(feature = "ts", derive(TS))]
26391#[cfg_attr(feature = "ts", ts(export))]
26392pub struct MAG_CAL_REPORT_DATA {
26393    #[doc = "RMS milligauss residuals."]
26394    pub fitness: f32,
26395    #[doc = "X offset."]
26396    pub ofs_x: f32,
26397    #[doc = "Y offset."]
26398    pub ofs_y: f32,
26399    #[doc = "Z offset."]
26400    pub ofs_z: f32,
26401    #[doc = "X diagonal (matrix 11)."]
26402    pub diag_x: f32,
26403    #[doc = "Y diagonal (matrix 22)."]
26404    pub diag_y: f32,
26405    #[doc = "Z diagonal (matrix 33)."]
26406    pub diag_z: f32,
26407    #[doc = "X off-diagonal (matrix 12 and 21)."]
26408    pub offdiag_x: f32,
26409    #[doc = "Y off-diagonal (matrix 13 and 31)."]
26410    pub offdiag_y: f32,
26411    #[doc = "Z off-diagonal (matrix 32 and 23)."]
26412    pub offdiag_z: f32,
26413    #[doc = "Compass being calibrated."]
26414    pub compass_id: u8,
26415    #[doc = "Bitmask of compasses being calibrated."]
26416    pub cal_mask: u8,
26417    #[doc = "Calibration Status."]
26418    pub cal_status: MagCalStatus,
26419    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
26420    pub autosaved: u8,
26421    #[doc = "Confidence in orientation (higher is better)."]
26422    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26423    pub orientation_confidence: f32,
26424    #[doc = "orientation before calibration."]
26425    #[cfg_attr(feature = "serde", serde(default))]
26426    pub old_orientation: MavSensorOrientation,
26427    #[doc = "orientation after calibration."]
26428    #[cfg_attr(feature = "serde", serde(default))]
26429    pub new_orientation: MavSensorOrientation,
26430    #[doc = "field radius correction factor"]
26431    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26432    pub scale_factor: f32,
26433}
26434impl MAG_CAL_REPORT_DATA {
26435    pub const ENCODED_LEN: usize = 54usize;
26436    pub const DEFAULT: Self = Self {
26437        fitness: 0.0_f32,
26438        ofs_x: 0.0_f32,
26439        ofs_y: 0.0_f32,
26440        ofs_z: 0.0_f32,
26441        diag_x: 0.0_f32,
26442        diag_y: 0.0_f32,
26443        diag_z: 0.0_f32,
26444        offdiag_x: 0.0_f32,
26445        offdiag_y: 0.0_f32,
26446        offdiag_z: 0.0_f32,
26447        compass_id: 0_u8,
26448        cal_mask: 0_u8,
26449        cal_status: MagCalStatus::DEFAULT,
26450        autosaved: 0_u8,
26451        orientation_confidence: 0.0_f32,
26452        old_orientation: MavSensorOrientation::DEFAULT,
26453        new_orientation: MavSensorOrientation::DEFAULT,
26454        scale_factor: 0.0_f32,
26455    };
26456    #[cfg(feature = "arbitrary")]
26457    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26458        use arbitrary::{Arbitrary, Unstructured};
26459        let mut buf = [0u8; 1024];
26460        rng.fill_bytes(&mut buf);
26461        let mut unstructured = Unstructured::new(&buf);
26462        Self::arbitrary(&mut unstructured).unwrap_or_default()
26463    }
26464}
26465impl Default for MAG_CAL_REPORT_DATA {
26466    fn default() -> Self {
26467        Self::DEFAULT.clone()
26468    }
26469}
26470impl MessageData for MAG_CAL_REPORT_DATA {
26471    type Message = MavMessage;
26472    const ID: u32 = 192u32;
26473    const NAME: &'static str = "MAG_CAL_REPORT";
26474    const EXTRA_CRC: u8 = 36u8;
26475    const ENCODED_LEN: usize = 54usize;
26476    fn deser(
26477        _version: MavlinkVersion,
26478        __input: &[u8],
26479    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26480        let avail_len = __input.len();
26481        let mut payload_buf = [0; Self::ENCODED_LEN];
26482        let mut buf = if avail_len < Self::ENCODED_LEN {
26483            payload_buf[0..avail_len].copy_from_slice(__input);
26484            Bytes::new(&payload_buf)
26485        } else {
26486            Bytes::new(__input)
26487        };
26488        let mut __struct = Self::default();
26489        __struct.fitness = buf.get_f32_le()?;
26490        __struct.ofs_x = buf.get_f32_le()?;
26491        __struct.ofs_y = buf.get_f32_le()?;
26492        __struct.ofs_z = buf.get_f32_le()?;
26493        __struct.diag_x = buf.get_f32_le()?;
26494        __struct.diag_y = buf.get_f32_le()?;
26495        __struct.diag_z = buf.get_f32_le()?;
26496        __struct.offdiag_x = buf.get_f32_le()?;
26497        __struct.offdiag_y = buf.get_f32_le()?;
26498        __struct.offdiag_z = buf.get_f32_le()?;
26499        __struct.compass_id = buf.get_u8()?;
26500        __struct.cal_mask = buf.get_u8()?;
26501        let tmp = buf.get_u8()?;
26502        __struct.cal_status =
26503            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26504                enum_type: "MagCalStatus",
26505                value: tmp as u64,
26506            })?;
26507        __struct.autosaved = buf.get_u8()?;
26508        __struct.orientation_confidence = buf.get_f32_le()?;
26509        let tmp = buf.get_u8()?;
26510        __struct.old_orientation =
26511            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26512                enum_type: "MavSensorOrientation",
26513                value: tmp as u64,
26514            })?;
26515        let tmp = buf.get_u8()?;
26516        __struct.new_orientation =
26517            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26518                enum_type: "MavSensorOrientation",
26519                value: tmp as u64,
26520            })?;
26521        __struct.scale_factor = buf.get_f32_le()?;
26522        Ok(__struct)
26523    }
26524    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26525        let mut __tmp = BytesMut::new(bytes);
26526        #[allow(clippy::absurd_extreme_comparisons)]
26527        #[allow(unused_comparisons)]
26528        if __tmp.remaining() < Self::ENCODED_LEN {
26529            panic!(
26530                "buffer is too small (need {} bytes, but got {})",
26531                Self::ENCODED_LEN,
26532                __tmp.remaining(),
26533            )
26534        }
26535        __tmp.put_f32_le(self.fitness);
26536        __tmp.put_f32_le(self.ofs_x);
26537        __tmp.put_f32_le(self.ofs_y);
26538        __tmp.put_f32_le(self.ofs_z);
26539        __tmp.put_f32_le(self.diag_x);
26540        __tmp.put_f32_le(self.diag_y);
26541        __tmp.put_f32_le(self.diag_z);
26542        __tmp.put_f32_le(self.offdiag_x);
26543        __tmp.put_f32_le(self.offdiag_y);
26544        __tmp.put_f32_le(self.offdiag_z);
26545        __tmp.put_u8(self.compass_id);
26546        __tmp.put_u8(self.cal_mask);
26547        __tmp.put_u8(self.cal_status as u8);
26548        __tmp.put_u8(self.autosaved);
26549        if matches!(version, MavlinkVersion::V2) {
26550            __tmp.put_f32_le(self.orientation_confidence);
26551            __tmp.put_u8(self.old_orientation as u8);
26552            __tmp.put_u8(self.new_orientation as u8);
26553            __tmp.put_f32_le(self.scale_factor);
26554            let len = __tmp.len();
26555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26556        } else {
26557            __tmp.len()
26558        }
26559    }
26560}
26561#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
26562#[doc = ""]
26563#[doc = "ID: 69"]
26564#[derive(Debug, Clone, PartialEq)]
26565#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26567#[cfg_attr(feature = "ts", derive(TS))]
26568#[cfg_attr(feature = "ts", ts(export))]
26569pub struct MANUAL_CONTROL_DATA {
26570    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
26571    pub x: i16,
26572    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
26573    pub y: i16,
26574    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
26575    pub z: i16,
26576    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
26577    pub r: i16,
26578    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
26579    pub buttons: u16,
26580    #[doc = "The system to be controlled."]
26581    pub target: u8,
26582    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
26583    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26584    pub buttons2: u16,
26585    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
26586    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26587    pub enabled_extensions: u8,
26588    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
26589    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26590    pub s: i16,
26591    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
26592    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26593    pub t: i16,
26594    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
26595    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26596    pub aux1: i16,
26597    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
26598    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26599    pub aux2: i16,
26600    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
26601    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26602    pub aux3: i16,
26603    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
26604    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26605    pub aux4: i16,
26606    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
26607    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26608    pub aux5: i16,
26609    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
26610    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26611    pub aux6: i16,
26612}
26613impl MANUAL_CONTROL_DATA {
26614    pub const ENCODED_LEN: usize = 30usize;
26615    pub const DEFAULT: Self = Self {
26616        x: 0_i16,
26617        y: 0_i16,
26618        z: 0_i16,
26619        r: 0_i16,
26620        buttons: 0_u16,
26621        target: 0_u8,
26622        buttons2: 0_u16,
26623        enabled_extensions: 0_u8,
26624        s: 0_i16,
26625        t: 0_i16,
26626        aux1: 0_i16,
26627        aux2: 0_i16,
26628        aux3: 0_i16,
26629        aux4: 0_i16,
26630        aux5: 0_i16,
26631        aux6: 0_i16,
26632    };
26633    #[cfg(feature = "arbitrary")]
26634    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26635        use arbitrary::{Arbitrary, Unstructured};
26636        let mut buf = [0u8; 1024];
26637        rng.fill_bytes(&mut buf);
26638        let mut unstructured = Unstructured::new(&buf);
26639        Self::arbitrary(&mut unstructured).unwrap_or_default()
26640    }
26641}
26642impl Default for MANUAL_CONTROL_DATA {
26643    fn default() -> Self {
26644        Self::DEFAULT.clone()
26645    }
26646}
26647impl MessageData for MANUAL_CONTROL_DATA {
26648    type Message = MavMessage;
26649    const ID: u32 = 69u32;
26650    const NAME: &'static str = "MANUAL_CONTROL";
26651    const EXTRA_CRC: u8 = 243u8;
26652    const ENCODED_LEN: usize = 30usize;
26653    fn deser(
26654        _version: MavlinkVersion,
26655        __input: &[u8],
26656    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26657        let avail_len = __input.len();
26658        let mut payload_buf = [0; Self::ENCODED_LEN];
26659        let mut buf = if avail_len < Self::ENCODED_LEN {
26660            payload_buf[0..avail_len].copy_from_slice(__input);
26661            Bytes::new(&payload_buf)
26662        } else {
26663            Bytes::new(__input)
26664        };
26665        let mut __struct = Self::default();
26666        __struct.x = buf.get_i16_le()?;
26667        __struct.y = buf.get_i16_le()?;
26668        __struct.z = buf.get_i16_le()?;
26669        __struct.r = buf.get_i16_le()?;
26670        __struct.buttons = buf.get_u16_le()?;
26671        __struct.target = buf.get_u8()?;
26672        __struct.buttons2 = buf.get_u16_le()?;
26673        __struct.enabled_extensions = buf.get_u8()?;
26674        __struct.s = buf.get_i16_le()?;
26675        __struct.t = buf.get_i16_le()?;
26676        __struct.aux1 = buf.get_i16_le()?;
26677        __struct.aux2 = buf.get_i16_le()?;
26678        __struct.aux3 = buf.get_i16_le()?;
26679        __struct.aux4 = buf.get_i16_le()?;
26680        __struct.aux5 = buf.get_i16_le()?;
26681        __struct.aux6 = buf.get_i16_le()?;
26682        Ok(__struct)
26683    }
26684    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26685        let mut __tmp = BytesMut::new(bytes);
26686        #[allow(clippy::absurd_extreme_comparisons)]
26687        #[allow(unused_comparisons)]
26688        if __tmp.remaining() < Self::ENCODED_LEN {
26689            panic!(
26690                "buffer is too small (need {} bytes, but got {})",
26691                Self::ENCODED_LEN,
26692                __tmp.remaining(),
26693            )
26694        }
26695        __tmp.put_i16_le(self.x);
26696        __tmp.put_i16_le(self.y);
26697        __tmp.put_i16_le(self.z);
26698        __tmp.put_i16_le(self.r);
26699        __tmp.put_u16_le(self.buttons);
26700        __tmp.put_u8(self.target);
26701        if matches!(version, MavlinkVersion::V2) {
26702            __tmp.put_u16_le(self.buttons2);
26703            __tmp.put_u8(self.enabled_extensions);
26704            __tmp.put_i16_le(self.s);
26705            __tmp.put_i16_le(self.t);
26706            __tmp.put_i16_le(self.aux1);
26707            __tmp.put_i16_le(self.aux2);
26708            __tmp.put_i16_le(self.aux3);
26709            __tmp.put_i16_le(self.aux4);
26710            __tmp.put_i16_le(self.aux5);
26711            __tmp.put_i16_le(self.aux6);
26712            let len = __tmp.len();
26713            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26714        } else {
26715            __tmp.len()
26716        }
26717    }
26718}
26719#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
26720#[doc = ""]
26721#[doc = "ID: 81"]
26722#[derive(Debug, Clone, PartialEq)]
26723#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26724#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26725#[cfg_attr(feature = "ts", derive(TS))]
26726#[cfg_attr(feature = "ts", ts(export))]
26727pub struct MANUAL_SETPOINT_DATA {
26728    #[doc = "Timestamp (time since system boot)."]
26729    pub time_boot_ms: u32,
26730    #[doc = "Desired roll rate"]
26731    pub roll: f32,
26732    #[doc = "Desired pitch rate"]
26733    pub pitch: f32,
26734    #[doc = "Desired yaw rate"]
26735    pub yaw: f32,
26736    #[doc = "Collective thrust, normalized to 0 .. 1"]
26737    pub thrust: f32,
26738    #[doc = "Flight mode switch position, 0.. 255"]
26739    pub mode_switch: u8,
26740    #[doc = "Override mode switch position, 0.. 255"]
26741    pub manual_override_switch: u8,
26742}
26743impl MANUAL_SETPOINT_DATA {
26744    pub const ENCODED_LEN: usize = 22usize;
26745    pub const DEFAULT: Self = Self {
26746        time_boot_ms: 0_u32,
26747        roll: 0.0_f32,
26748        pitch: 0.0_f32,
26749        yaw: 0.0_f32,
26750        thrust: 0.0_f32,
26751        mode_switch: 0_u8,
26752        manual_override_switch: 0_u8,
26753    };
26754    #[cfg(feature = "arbitrary")]
26755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26756        use arbitrary::{Arbitrary, Unstructured};
26757        let mut buf = [0u8; 1024];
26758        rng.fill_bytes(&mut buf);
26759        let mut unstructured = Unstructured::new(&buf);
26760        Self::arbitrary(&mut unstructured).unwrap_or_default()
26761    }
26762}
26763impl Default for MANUAL_SETPOINT_DATA {
26764    fn default() -> Self {
26765        Self::DEFAULT.clone()
26766    }
26767}
26768impl MessageData for MANUAL_SETPOINT_DATA {
26769    type Message = MavMessage;
26770    const ID: u32 = 81u32;
26771    const NAME: &'static str = "MANUAL_SETPOINT";
26772    const EXTRA_CRC: u8 = 106u8;
26773    const ENCODED_LEN: usize = 22usize;
26774    fn deser(
26775        _version: MavlinkVersion,
26776        __input: &[u8],
26777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26778        let avail_len = __input.len();
26779        let mut payload_buf = [0; Self::ENCODED_LEN];
26780        let mut buf = if avail_len < Self::ENCODED_LEN {
26781            payload_buf[0..avail_len].copy_from_slice(__input);
26782            Bytes::new(&payload_buf)
26783        } else {
26784            Bytes::new(__input)
26785        };
26786        let mut __struct = Self::default();
26787        __struct.time_boot_ms = buf.get_u32_le()?;
26788        __struct.roll = buf.get_f32_le()?;
26789        __struct.pitch = buf.get_f32_le()?;
26790        __struct.yaw = buf.get_f32_le()?;
26791        __struct.thrust = buf.get_f32_le()?;
26792        __struct.mode_switch = buf.get_u8()?;
26793        __struct.manual_override_switch = buf.get_u8()?;
26794        Ok(__struct)
26795    }
26796    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26797        let mut __tmp = BytesMut::new(bytes);
26798        #[allow(clippy::absurd_extreme_comparisons)]
26799        #[allow(unused_comparisons)]
26800        if __tmp.remaining() < Self::ENCODED_LEN {
26801            panic!(
26802                "buffer is too small (need {} bytes, but got {})",
26803                Self::ENCODED_LEN,
26804                __tmp.remaining(),
26805            )
26806        }
26807        __tmp.put_u32_le(self.time_boot_ms);
26808        __tmp.put_f32_le(self.roll);
26809        __tmp.put_f32_le(self.pitch);
26810        __tmp.put_f32_le(self.yaw);
26811        __tmp.put_f32_le(self.thrust);
26812        __tmp.put_u8(self.mode_switch);
26813        __tmp.put_u8(self.manual_override_switch);
26814        if matches!(version, MavlinkVersion::V2) {
26815            let len = __tmp.len();
26816            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26817        } else {
26818            __tmp.len()
26819        }
26820    }
26821}
26822#[doc = "The MCU status, giving MCU temperature and voltage. The min and max voltages are to allow for detecting power supply instability."]
26823#[doc = ""]
26824#[doc = "ID: 11039"]
26825#[derive(Debug, Clone, PartialEq)]
26826#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26828#[cfg_attr(feature = "ts", derive(TS))]
26829#[cfg_attr(feature = "ts", ts(export))]
26830pub struct MCU_STATUS_DATA {
26831    #[doc = "MCU Internal temperature"]
26832    pub MCU_temperature: i16,
26833    #[doc = "MCU voltage"]
26834    pub MCU_voltage: u16,
26835    #[doc = "MCU voltage minimum"]
26836    pub MCU_voltage_min: u16,
26837    #[doc = "MCU voltage maximum"]
26838    pub MCU_voltage_max: u16,
26839    #[doc = "MCU instance"]
26840    pub id: u8,
26841}
26842impl MCU_STATUS_DATA {
26843    pub const ENCODED_LEN: usize = 9usize;
26844    pub const DEFAULT: Self = Self {
26845        MCU_temperature: 0_i16,
26846        MCU_voltage: 0_u16,
26847        MCU_voltage_min: 0_u16,
26848        MCU_voltage_max: 0_u16,
26849        id: 0_u8,
26850    };
26851    #[cfg(feature = "arbitrary")]
26852    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26853        use arbitrary::{Arbitrary, Unstructured};
26854        let mut buf = [0u8; 1024];
26855        rng.fill_bytes(&mut buf);
26856        let mut unstructured = Unstructured::new(&buf);
26857        Self::arbitrary(&mut unstructured).unwrap_or_default()
26858    }
26859}
26860impl Default for MCU_STATUS_DATA {
26861    fn default() -> Self {
26862        Self::DEFAULT.clone()
26863    }
26864}
26865impl MessageData for MCU_STATUS_DATA {
26866    type Message = MavMessage;
26867    const ID: u32 = 11039u32;
26868    const NAME: &'static str = "MCU_STATUS";
26869    const EXTRA_CRC: u8 = 142u8;
26870    const ENCODED_LEN: usize = 9usize;
26871    fn deser(
26872        _version: MavlinkVersion,
26873        __input: &[u8],
26874    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26875        let avail_len = __input.len();
26876        let mut payload_buf = [0; Self::ENCODED_LEN];
26877        let mut buf = if avail_len < Self::ENCODED_LEN {
26878            payload_buf[0..avail_len].copy_from_slice(__input);
26879            Bytes::new(&payload_buf)
26880        } else {
26881            Bytes::new(__input)
26882        };
26883        let mut __struct = Self::default();
26884        __struct.MCU_temperature = buf.get_i16_le()?;
26885        __struct.MCU_voltage = buf.get_u16_le()?;
26886        __struct.MCU_voltage_min = buf.get_u16_le()?;
26887        __struct.MCU_voltage_max = buf.get_u16_le()?;
26888        __struct.id = buf.get_u8()?;
26889        Ok(__struct)
26890    }
26891    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26892        let mut __tmp = BytesMut::new(bytes);
26893        #[allow(clippy::absurd_extreme_comparisons)]
26894        #[allow(unused_comparisons)]
26895        if __tmp.remaining() < Self::ENCODED_LEN {
26896            panic!(
26897                "buffer is too small (need {} bytes, but got {})",
26898                Self::ENCODED_LEN,
26899                __tmp.remaining(),
26900            )
26901        }
26902        __tmp.put_i16_le(self.MCU_temperature);
26903        __tmp.put_u16_le(self.MCU_voltage);
26904        __tmp.put_u16_le(self.MCU_voltage_min);
26905        __tmp.put_u16_le(self.MCU_voltage_max);
26906        __tmp.put_u8(self.id);
26907        if matches!(version, MavlinkVersion::V2) {
26908            let len = __tmp.len();
26909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26910        } else {
26911            __tmp.len()
26912        }
26913    }
26914}
26915#[doc = "State of autopilot RAM."]
26916#[doc = ""]
26917#[doc = "ID: 152"]
26918#[derive(Debug, Clone, PartialEq)]
26919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26921#[cfg_attr(feature = "ts", derive(TS))]
26922#[cfg_attr(feature = "ts", ts(export))]
26923pub struct MEMINFO_DATA {
26924    #[doc = "Heap top."]
26925    pub brkval: u16,
26926    #[doc = "Free memory."]
26927    pub freemem: u16,
26928    #[doc = "Free memory (32 bit)."]
26929    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26930    pub freemem32: u32,
26931}
26932impl MEMINFO_DATA {
26933    pub const ENCODED_LEN: usize = 8usize;
26934    pub const DEFAULT: Self = Self {
26935        brkval: 0_u16,
26936        freemem: 0_u16,
26937        freemem32: 0_u32,
26938    };
26939    #[cfg(feature = "arbitrary")]
26940    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26941        use arbitrary::{Arbitrary, Unstructured};
26942        let mut buf = [0u8; 1024];
26943        rng.fill_bytes(&mut buf);
26944        let mut unstructured = Unstructured::new(&buf);
26945        Self::arbitrary(&mut unstructured).unwrap_or_default()
26946    }
26947}
26948impl Default for MEMINFO_DATA {
26949    fn default() -> Self {
26950        Self::DEFAULT.clone()
26951    }
26952}
26953impl MessageData for MEMINFO_DATA {
26954    type Message = MavMessage;
26955    const ID: u32 = 152u32;
26956    const NAME: &'static str = "MEMINFO";
26957    const EXTRA_CRC: u8 = 208u8;
26958    const ENCODED_LEN: usize = 8usize;
26959    fn deser(
26960        _version: MavlinkVersion,
26961        __input: &[u8],
26962    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26963        let avail_len = __input.len();
26964        let mut payload_buf = [0; Self::ENCODED_LEN];
26965        let mut buf = if avail_len < Self::ENCODED_LEN {
26966            payload_buf[0..avail_len].copy_from_slice(__input);
26967            Bytes::new(&payload_buf)
26968        } else {
26969            Bytes::new(__input)
26970        };
26971        let mut __struct = Self::default();
26972        __struct.brkval = buf.get_u16_le()?;
26973        __struct.freemem = buf.get_u16_le()?;
26974        __struct.freemem32 = buf.get_u32_le()?;
26975        Ok(__struct)
26976    }
26977    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26978        let mut __tmp = BytesMut::new(bytes);
26979        #[allow(clippy::absurd_extreme_comparisons)]
26980        #[allow(unused_comparisons)]
26981        if __tmp.remaining() < Self::ENCODED_LEN {
26982            panic!(
26983                "buffer is too small (need {} bytes, but got {})",
26984                Self::ENCODED_LEN,
26985                __tmp.remaining(),
26986            )
26987        }
26988        __tmp.put_u16_le(self.brkval);
26989        __tmp.put_u16_le(self.freemem);
26990        if matches!(version, MavlinkVersion::V2) {
26991            __tmp.put_u32_le(self.freemem32);
26992            let len = __tmp.len();
26993            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26994        } else {
26995            __tmp.len()
26996        }
26997    }
26998}
26999#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
27000#[doc = ""]
27001#[doc = "ID: 249"]
27002#[derive(Debug, Clone, PartialEq)]
27003#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27004#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27005#[cfg_attr(feature = "ts", derive(TS))]
27006#[cfg_attr(feature = "ts", ts(export))]
27007pub struct MEMORY_VECT_DATA {
27008    #[doc = "Starting address of the debug variables"]
27009    pub address: u16,
27010    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
27011    pub ver: u8,
27012    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
27013    pub mavtype: u8,
27014    #[doc = "Memory contents at specified address"]
27015    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27016    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27017    pub value: [i8; 32],
27018}
27019impl MEMORY_VECT_DATA {
27020    pub const ENCODED_LEN: usize = 36usize;
27021    pub const DEFAULT: Self = Self {
27022        address: 0_u16,
27023        ver: 0_u8,
27024        mavtype: 0_u8,
27025        value: [0_i8; 32usize],
27026    };
27027    #[cfg(feature = "arbitrary")]
27028    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27029        use arbitrary::{Arbitrary, Unstructured};
27030        let mut buf = [0u8; 1024];
27031        rng.fill_bytes(&mut buf);
27032        let mut unstructured = Unstructured::new(&buf);
27033        Self::arbitrary(&mut unstructured).unwrap_or_default()
27034    }
27035}
27036impl Default for MEMORY_VECT_DATA {
27037    fn default() -> Self {
27038        Self::DEFAULT.clone()
27039    }
27040}
27041impl MessageData for MEMORY_VECT_DATA {
27042    type Message = MavMessage;
27043    const ID: u32 = 249u32;
27044    const NAME: &'static str = "MEMORY_VECT";
27045    const EXTRA_CRC: u8 = 204u8;
27046    const ENCODED_LEN: usize = 36usize;
27047    fn deser(
27048        _version: MavlinkVersion,
27049        __input: &[u8],
27050    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27051        let avail_len = __input.len();
27052        let mut payload_buf = [0; Self::ENCODED_LEN];
27053        let mut buf = if avail_len < Self::ENCODED_LEN {
27054            payload_buf[0..avail_len].copy_from_slice(__input);
27055            Bytes::new(&payload_buf)
27056        } else {
27057            Bytes::new(__input)
27058        };
27059        let mut __struct = Self::default();
27060        __struct.address = buf.get_u16_le()?;
27061        __struct.ver = buf.get_u8()?;
27062        __struct.mavtype = buf.get_u8()?;
27063        for v in &mut __struct.value {
27064            let val = buf.get_i8()?;
27065            *v = val;
27066        }
27067        Ok(__struct)
27068    }
27069    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27070        let mut __tmp = BytesMut::new(bytes);
27071        #[allow(clippy::absurd_extreme_comparisons)]
27072        #[allow(unused_comparisons)]
27073        if __tmp.remaining() < Self::ENCODED_LEN {
27074            panic!(
27075                "buffer is too small (need {} bytes, but got {})",
27076                Self::ENCODED_LEN,
27077                __tmp.remaining(),
27078            )
27079        }
27080        __tmp.put_u16_le(self.address);
27081        __tmp.put_u8(self.ver);
27082        __tmp.put_u8(self.mavtype);
27083        for val in &self.value {
27084            __tmp.put_i8(*val);
27085        }
27086        if matches!(version, MavlinkVersion::V2) {
27087            let len = __tmp.len();
27088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27089        } else {
27090            __tmp.len()
27091        }
27092    }
27093}
27094#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
27095#[doc = ""]
27096#[doc = "ID: 244"]
27097#[derive(Debug, Clone, PartialEq)]
27098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27100#[cfg_attr(feature = "ts", derive(TS))]
27101#[cfg_attr(feature = "ts", ts(export))]
27102pub struct MESSAGE_INTERVAL_DATA {
27103    #[doc = "0 indicates the interval at which it is sent."]
27104    pub interval_us: i32,
27105    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
27106    pub message_id: u16,
27107}
27108impl MESSAGE_INTERVAL_DATA {
27109    pub const ENCODED_LEN: usize = 6usize;
27110    pub const DEFAULT: Self = Self {
27111        interval_us: 0_i32,
27112        message_id: 0_u16,
27113    };
27114    #[cfg(feature = "arbitrary")]
27115    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27116        use arbitrary::{Arbitrary, Unstructured};
27117        let mut buf = [0u8; 1024];
27118        rng.fill_bytes(&mut buf);
27119        let mut unstructured = Unstructured::new(&buf);
27120        Self::arbitrary(&mut unstructured).unwrap_or_default()
27121    }
27122}
27123impl Default for MESSAGE_INTERVAL_DATA {
27124    fn default() -> Self {
27125        Self::DEFAULT.clone()
27126    }
27127}
27128impl MessageData for MESSAGE_INTERVAL_DATA {
27129    type Message = MavMessage;
27130    const ID: u32 = 244u32;
27131    const NAME: &'static str = "MESSAGE_INTERVAL";
27132    const EXTRA_CRC: u8 = 95u8;
27133    const ENCODED_LEN: usize = 6usize;
27134    fn deser(
27135        _version: MavlinkVersion,
27136        __input: &[u8],
27137    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27138        let avail_len = __input.len();
27139        let mut payload_buf = [0; Self::ENCODED_LEN];
27140        let mut buf = if avail_len < Self::ENCODED_LEN {
27141            payload_buf[0..avail_len].copy_from_slice(__input);
27142            Bytes::new(&payload_buf)
27143        } else {
27144            Bytes::new(__input)
27145        };
27146        let mut __struct = Self::default();
27147        __struct.interval_us = buf.get_i32_le()?;
27148        __struct.message_id = buf.get_u16_le()?;
27149        Ok(__struct)
27150    }
27151    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27152        let mut __tmp = BytesMut::new(bytes);
27153        #[allow(clippy::absurd_extreme_comparisons)]
27154        #[allow(unused_comparisons)]
27155        if __tmp.remaining() < Self::ENCODED_LEN {
27156            panic!(
27157                "buffer is too small (need {} bytes, but got {})",
27158                Self::ENCODED_LEN,
27159                __tmp.remaining(),
27160            )
27161        }
27162        __tmp.put_i32_le(self.interval_us);
27163        __tmp.put_u16_le(self.message_id);
27164        if matches!(version, MavlinkVersion::V2) {
27165            let len = __tmp.len();
27166            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27167        } else {
27168            __tmp.len()
27169        }
27170    }
27171}
27172#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
27173#[doc = ""]
27174#[doc = "ID: 47"]
27175#[derive(Debug, Clone, PartialEq)]
27176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27177#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27178#[cfg_attr(feature = "ts", derive(TS))]
27179#[cfg_attr(feature = "ts", ts(export))]
27180pub struct MISSION_ACK_DATA {
27181    #[doc = "System ID"]
27182    pub target_system: u8,
27183    #[doc = "Component ID"]
27184    pub target_component: u8,
27185    #[doc = "Mission result."]
27186    pub mavtype: MavMissionResult,
27187    #[doc = "Mission type."]
27188    #[cfg_attr(feature = "serde", serde(default))]
27189    pub mission_type: MavMissionType,
27190    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
27191    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27192    pub opaque_id: u32,
27193}
27194impl MISSION_ACK_DATA {
27195    pub const ENCODED_LEN: usize = 8usize;
27196    pub const DEFAULT: Self = Self {
27197        target_system: 0_u8,
27198        target_component: 0_u8,
27199        mavtype: MavMissionResult::DEFAULT,
27200        mission_type: MavMissionType::DEFAULT,
27201        opaque_id: 0_u32,
27202    };
27203    #[cfg(feature = "arbitrary")]
27204    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27205        use arbitrary::{Arbitrary, Unstructured};
27206        let mut buf = [0u8; 1024];
27207        rng.fill_bytes(&mut buf);
27208        let mut unstructured = Unstructured::new(&buf);
27209        Self::arbitrary(&mut unstructured).unwrap_or_default()
27210    }
27211}
27212impl Default for MISSION_ACK_DATA {
27213    fn default() -> Self {
27214        Self::DEFAULT.clone()
27215    }
27216}
27217impl MessageData for MISSION_ACK_DATA {
27218    type Message = MavMessage;
27219    const ID: u32 = 47u32;
27220    const NAME: &'static str = "MISSION_ACK";
27221    const EXTRA_CRC: u8 = 153u8;
27222    const ENCODED_LEN: usize = 8usize;
27223    fn deser(
27224        _version: MavlinkVersion,
27225        __input: &[u8],
27226    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27227        let avail_len = __input.len();
27228        let mut payload_buf = [0; Self::ENCODED_LEN];
27229        let mut buf = if avail_len < Self::ENCODED_LEN {
27230            payload_buf[0..avail_len].copy_from_slice(__input);
27231            Bytes::new(&payload_buf)
27232        } else {
27233            Bytes::new(__input)
27234        };
27235        let mut __struct = Self::default();
27236        __struct.target_system = buf.get_u8()?;
27237        __struct.target_component = buf.get_u8()?;
27238        let tmp = buf.get_u8()?;
27239        __struct.mavtype =
27240            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27241                enum_type: "MavMissionResult",
27242                value: tmp as u64,
27243            })?;
27244        let tmp = buf.get_u8()?;
27245        __struct.mission_type =
27246            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27247                enum_type: "MavMissionType",
27248                value: tmp as u64,
27249            })?;
27250        __struct.opaque_id = buf.get_u32_le()?;
27251        Ok(__struct)
27252    }
27253    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27254        let mut __tmp = BytesMut::new(bytes);
27255        #[allow(clippy::absurd_extreme_comparisons)]
27256        #[allow(unused_comparisons)]
27257        if __tmp.remaining() < Self::ENCODED_LEN {
27258            panic!(
27259                "buffer is too small (need {} bytes, but got {})",
27260                Self::ENCODED_LEN,
27261                __tmp.remaining(),
27262            )
27263        }
27264        __tmp.put_u8(self.target_system);
27265        __tmp.put_u8(self.target_component);
27266        __tmp.put_u8(self.mavtype as u8);
27267        if matches!(version, MavlinkVersion::V2) {
27268            __tmp.put_u8(self.mission_type as u8);
27269            __tmp.put_u32_le(self.opaque_id);
27270            let len = __tmp.len();
27271            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27272        } else {
27273            __tmp.len()
27274        }
27275    }
27276}
27277#[doc = "Delete all mission items at once."]
27278#[doc = ""]
27279#[doc = "ID: 45"]
27280#[derive(Debug, Clone, PartialEq)]
27281#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27282#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27283#[cfg_attr(feature = "ts", derive(TS))]
27284#[cfg_attr(feature = "ts", ts(export))]
27285pub struct MISSION_CLEAR_ALL_DATA {
27286    #[doc = "System ID"]
27287    pub target_system: u8,
27288    #[doc = "Component ID"]
27289    pub target_component: u8,
27290    #[doc = "Mission type."]
27291    #[cfg_attr(feature = "serde", serde(default))]
27292    pub mission_type: MavMissionType,
27293}
27294impl MISSION_CLEAR_ALL_DATA {
27295    pub const ENCODED_LEN: usize = 3usize;
27296    pub const DEFAULT: Self = Self {
27297        target_system: 0_u8,
27298        target_component: 0_u8,
27299        mission_type: MavMissionType::DEFAULT,
27300    };
27301    #[cfg(feature = "arbitrary")]
27302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27303        use arbitrary::{Arbitrary, Unstructured};
27304        let mut buf = [0u8; 1024];
27305        rng.fill_bytes(&mut buf);
27306        let mut unstructured = Unstructured::new(&buf);
27307        Self::arbitrary(&mut unstructured).unwrap_or_default()
27308    }
27309}
27310impl Default for MISSION_CLEAR_ALL_DATA {
27311    fn default() -> Self {
27312        Self::DEFAULT.clone()
27313    }
27314}
27315impl MessageData for MISSION_CLEAR_ALL_DATA {
27316    type Message = MavMessage;
27317    const ID: u32 = 45u32;
27318    const NAME: &'static str = "MISSION_CLEAR_ALL";
27319    const EXTRA_CRC: u8 = 232u8;
27320    const ENCODED_LEN: usize = 3usize;
27321    fn deser(
27322        _version: MavlinkVersion,
27323        __input: &[u8],
27324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27325        let avail_len = __input.len();
27326        let mut payload_buf = [0; Self::ENCODED_LEN];
27327        let mut buf = if avail_len < Self::ENCODED_LEN {
27328            payload_buf[0..avail_len].copy_from_slice(__input);
27329            Bytes::new(&payload_buf)
27330        } else {
27331            Bytes::new(__input)
27332        };
27333        let mut __struct = Self::default();
27334        __struct.target_system = buf.get_u8()?;
27335        __struct.target_component = buf.get_u8()?;
27336        let tmp = buf.get_u8()?;
27337        __struct.mission_type =
27338            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27339                enum_type: "MavMissionType",
27340                value: tmp as u64,
27341            })?;
27342        Ok(__struct)
27343    }
27344    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27345        let mut __tmp = BytesMut::new(bytes);
27346        #[allow(clippy::absurd_extreme_comparisons)]
27347        #[allow(unused_comparisons)]
27348        if __tmp.remaining() < Self::ENCODED_LEN {
27349            panic!(
27350                "buffer is too small (need {} bytes, but got {})",
27351                Self::ENCODED_LEN,
27352                __tmp.remaining(),
27353            )
27354        }
27355        __tmp.put_u8(self.target_system);
27356        __tmp.put_u8(self.target_component);
27357        if matches!(version, MavlinkVersion::V2) {
27358            __tmp.put_u8(self.mission_type as u8);
27359            let len = __tmp.len();
27360            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27361        } else {
27362            __tmp.len()
27363        }
27364    }
27365}
27366#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
27367#[doc = ""]
27368#[doc = "ID: 44"]
27369#[derive(Debug, Clone, PartialEq)]
27370#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27371#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27372#[cfg_attr(feature = "ts", derive(TS))]
27373#[cfg_attr(feature = "ts", ts(export))]
27374pub struct MISSION_COUNT_DATA {
27375    #[doc = "Number of mission items in the sequence"]
27376    pub count: u16,
27377    #[doc = "System ID"]
27378    pub target_system: u8,
27379    #[doc = "Component ID"]
27380    pub target_component: u8,
27381    #[doc = "Mission type."]
27382    #[cfg_attr(feature = "serde", serde(default))]
27383    pub mission_type: MavMissionType,
27384    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
27385    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27386    pub opaque_id: u32,
27387}
27388impl MISSION_COUNT_DATA {
27389    pub const ENCODED_LEN: usize = 9usize;
27390    pub const DEFAULT: Self = Self {
27391        count: 0_u16,
27392        target_system: 0_u8,
27393        target_component: 0_u8,
27394        mission_type: MavMissionType::DEFAULT,
27395        opaque_id: 0_u32,
27396    };
27397    #[cfg(feature = "arbitrary")]
27398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27399        use arbitrary::{Arbitrary, Unstructured};
27400        let mut buf = [0u8; 1024];
27401        rng.fill_bytes(&mut buf);
27402        let mut unstructured = Unstructured::new(&buf);
27403        Self::arbitrary(&mut unstructured).unwrap_or_default()
27404    }
27405}
27406impl Default for MISSION_COUNT_DATA {
27407    fn default() -> Self {
27408        Self::DEFAULT.clone()
27409    }
27410}
27411impl MessageData for MISSION_COUNT_DATA {
27412    type Message = MavMessage;
27413    const ID: u32 = 44u32;
27414    const NAME: &'static str = "MISSION_COUNT";
27415    const EXTRA_CRC: u8 = 221u8;
27416    const ENCODED_LEN: usize = 9usize;
27417    fn deser(
27418        _version: MavlinkVersion,
27419        __input: &[u8],
27420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27421        let avail_len = __input.len();
27422        let mut payload_buf = [0; Self::ENCODED_LEN];
27423        let mut buf = if avail_len < Self::ENCODED_LEN {
27424            payload_buf[0..avail_len].copy_from_slice(__input);
27425            Bytes::new(&payload_buf)
27426        } else {
27427            Bytes::new(__input)
27428        };
27429        let mut __struct = Self::default();
27430        __struct.count = buf.get_u16_le()?;
27431        __struct.target_system = buf.get_u8()?;
27432        __struct.target_component = buf.get_u8()?;
27433        let tmp = buf.get_u8()?;
27434        __struct.mission_type =
27435            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27436                enum_type: "MavMissionType",
27437                value: tmp as u64,
27438            })?;
27439        __struct.opaque_id = buf.get_u32_le()?;
27440        Ok(__struct)
27441    }
27442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27443        let mut __tmp = BytesMut::new(bytes);
27444        #[allow(clippy::absurd_extreme_comparisons)]
27445        #[allow(unused_comparisons)]
27446        if __tmp.remaining() < Self::ENCODED_LEN {
27447            panic!(
27448                "buffer is too small (need {} bytes, but got {})",
27449                Self::ENCODED_LEN,
27450                __tmp.remaining(),
27451            )
27452        }
27453        __tmp.put_u16_le(self.count);
27454        __tmp.put_u8(self.target_system);
27455        __tmp.put_u8(self.target_component);
27456        if matches!(version, MavlinkVersion::V2) {
27457            __tmp.put_u8(self.mission_type as u8);
27458            __tmp.put_u32_le(self.opaque_id);
27459            let len = __tmp.len();
27460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27461        } else {
27462            __tmp.len()
27463        }
27464    }
27465}
27466#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
27467#[doc = ""]
27468#[doc = "ID: 42"]
27469#[derive(Debug, Clone, PartialEq)]
27470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27472#[cfg_attr(feature = "ts", derive(TS))]
27473#[cfg_attr(feature = "ts", ts(export))]
27474pub struct MISSION_CURRENT_DATA {
27475    #[doc = "Sequence"]
27476    pub seq: u16,
27477    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
27478    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27479    pub total: u16,
27480    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
27481    #[cfg_attr(feature = "serde", serde(default))]
27482    pub mission_state: MissionState,
27483    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
27484    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27485    pub mission_mode: u8,
27486    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
27487    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27488    pub mission_id: u32,
27489    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
27490    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27491    pub fence_id: u32,
27492    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
27493    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27494    pub rally_points_id: u32,
27495}
27496impl MISSION_CURRENT_DATA {
27497    pub const ENCODED_LEN: usize = 18usize;
27498    pub const DEFAULT: Self = Self {
27499        seq: 0_u16,
27500        total: 0_u16,
27501        mission_state: MissionState::DEFAULT,
27502        mission_mode: 0_u8,
27503        mission_id: 0_u32,
27504        fence_id: 0_u32,
27505        rally_points_id: 0_u32,
27506    };
27507    #[cfg(feature = "arbitrary")]
27508    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27509        use arbitrary::{Arbitrary, Unstructured};
27510        let mut buf = [0u8; 1024];
27511        rng.fill_bytes(&mut buf);
27512        let mut unstructured = Unstructured::new(&buf);
27513        Self::arbitrary(&mut unstructured).unwrap_or_default()
27514    }
27515}
27516impl Default for MISSION_CURRENT_DATA {
27517    fn default() -> Self {
27518        Self::DEFAULT.clone()
27519    }
27520}
27521impl MessageData for MISSION_CURRENT_DATA {
27522    type Message = MavMessage;
27523    const ID: u32 = 42u32;
27524    const NAME: &'static str = "MISSION_CURRENT";
27525    const EXTRA_CRC: u8 = 28u8;
27526    const ENCODED_LEN: usize = 18usize;
27527    fn deser(
27528        _version: MavlinkVersion,
27529        __input: &[u8],
27530    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27531        let avail_len = __input.len();
27532        let mut payload_buf = [0; Self::ENCODED_LEN];
27533        let mut buf = if avail_len < Self::ENCODED_LEN {
27534            payload_buf[0..avail_len].copy_from_slice(__input);
27535            Bytes::new(&payload_buf)
27536        } else {
27537            Bytes::new(__input)
27538        };
27539        let mut __struct = Self::default();
27540        __struct.seq = buf.get_u16_le()?;
27541        __struct.total = buf.get_u16_le()?;
27542        let tmp = buf.get_u8()?;
27543        __struct.mission_state =
27544            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27545                enum_type: "MissionState",
27546                value: tmp as u64,
27547            })?;
27548        __struct.mission_mode = buf.get_u8()?;
27549        __struct.mission_id = buf.get_u32_le()?;
27550        __struct.fence_id = buf.get_u32_le()?;
27551        __struct.rally_points_id = buf.get_u32_le()?;
27552        Ok(__struct)
27553    }
27554    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27555        let mut __tmp = BytesMut::new(bytes);
27556        #[allow(clippy::absurd_extreme_comparisons)]
27557        #[allow(unused_comparisons)]
27558        if __tmp.remaining() < Self::ENCODED_LEN {
27559            panic!(
27560                "buffer is too small (need {} bytes, but got {})",
27561                Self::ENCODED_LEN,
27562                __tmp.remaining(),
27563            )
27564        }
27565        __tmp.put_u16_le(self.seq);
27566        if matches!(version, MavlinkVersion::V2) {
27567            __tmp.put_u16_le(self.total);
27568            __tmp.put_u8(self.mission_state as u8);
27569            __tmp.put_u8(self.mission_mode);
27570            __tmp.put_u32_le(self.mission_id);
27571            __tmp.put_u32_le(self.fence_id);
27572            __tmp.put_u32_le(self.rally_points_id);
27573            let len = __tmp.len();
27574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27575        } else {
27576            __tmp.len()
27577        }
27578    }
27579}
27580#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
27581#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
27582#[doc = ""]
27583#[doc = "ID: 39"]
27584#[derive(Debug, Clone, PartialEq)]
27585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27587#[cfg_attr(feature = "ts", derive(TS))]
27588#[cfg_attr(feature = "ts", ts(export))]
27589pub struct MISSION_ITEM_DATA {
27590    #[doc = "PARAM1, see MAV_CMD enum"]
27591    pub param1: f32,
27592    #[doc = "PARAM2, see MAV_CMD enum"]
27593    pub param2: f32,
27594    #[doc = "PARAM3, see MAV_CMD enum"]
27595    pub param3: f32,
27596    #[doc = "PARAM4, see MAV_CMD enum"]
27597    pub param4: f32,
27598    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
27599    pub x: f32,
27600    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
27601    pub y: f32,
27602    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
27603    pub z: f32,
27604    #[doc = "Sequence"]
27605    pub seq: u16,
27606    #[doc = "The scheduled action for the waypoint."]
27607    pub command: MavCmd,
27608    #[doc = "System ID"]
27609    pub target_system: u8,
27610    #[doc = "Component ID"]
27611    pub target_component: u8,
27612    #[doc = "The coordinate system of the waypoint."]
27613    pub frame: MavFrame,
27614    #[doc = "false:0, true:1"]
27615    pub current: u8,
27616    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
27617    pub autocontinue: u8,
27618    #[doc = "Mission type."]
27619    #[cfg_attr(feature = "serde", serde(default))]
27620    pub mission_type: MavMissionType,
27621}
27622impl MISSION_ITEM_DATA {
27623    pub const ENCODED_LEN: usize = 38usize;
27624    pub const DEFAULT: Self = Self {
27625        param1: 0.0_f32,
27626        param2: 0.0_f32,
27627        param3: 0.0_f32,
27628        param4: 0.0_f32,
27629        x: 0.0_f32,
27630        y: 0.0_f32,
27631        z: 0.0_f32,
27632        seq: 0_u16,
27633        command: MavCmd::DEFAULT,
27634        target_system: 0_u8,
27635        target_component: 0_u8,
27636        frame: MavFrame::DEFAULT,
27637        current: 0_u8,
27638        autocontinue: 0_u8,
27639        mission_type: MavMissionType::DEFAULT,
27640    };
27641    #[cfg(feature = "arbitrary")]
27642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27643        use arbitrary::{Arbitrary, Unstructured};
27644        let mut buf = [0u8; 1024];
27645        rng.fill_bytes(&mut buf);
27646        let mut unstructured = Unstructured::new(&buf);
27647        Self::arbitrary(&mut unstructured).unwrap_or_default()
27648    }
27649}
27650impl Default for MISSION_ITEM_DATA {
27651    fn default() -> Self {
27652        Self::DEFAULT.clone()
27653    }
27654}
27655impl MessageData for MISSION_ITEM_DATA {
27656    type Message = MavMessage;
27657    const ID: u32 = 39u32;
27658    const NAME: &'static str = "MISSION_ITEM";
27659    const EXTRA_CRC: u8 = 254u8;
27660    const ENCODED_LEN: usize = 38usize;
27661    fn deser(
27662        _version: MavlinkVersion,
27663        __input: &[u8],
27664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27665        let avail_len = __input.len();
27666        let mut payload_buf = [0; Self::ENCODED_LEN];
27667        let mut buf = if avail_len < Self::ENCODED_LEN {
27668            payload_buf[0..avail_len].copy_from_slice(__input);
27669            Bytes::new(&payload_buf)
27670        } else {
27671            Bytes::new(__input)
27672        };
27673        let mut __struct = Self::default();
27674        __struct.param1 = buf.get_f32_le()?;
27675        __struct.param2 = buf.get_f32_le()?;
27676        __struct.param3 = buf.get_f32_le()?;
27677        __struct.param4 = buf.get_f32_le()?;
27678        __struct.x = buf.get_f32_le()?;
27679        __struct.y = buf.get_f32_le()?;
27680        __struct.z = buf.get_f32_le()?;
27681        __struct.seq = buf.get_u16_le()?;
27682        let tmp = buf.get_u16_le()?;
27683        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
27684            ::mavlink_core::error::ParserError::InvalidEnum {
27685                enum_type: "MavCmd",
27686                value: tmp as u64,
27687            },
27688        )?;
27689        __struct.target_system = buf.get_u8()?;
27690        __struct.target_component = buf.get_u8()?;
27691        let tmp = buf.get_u8()?;
27692        __struct.frame =
27693            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27694                enum_type: "MavFrame",
27695                value: tmp as u64,
27696            })?;
27697        __struct.current = buf.get_u8()?;
27698        __struct.autocontinue = buf.get_u8()?;
27699        let tmp = buf.get_u8()?;
27700        __struct.mission_type =
27701            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27702                enum_type: "MavMissionType",
27703                value: tmp as u64,
27704            })?;
27705        Ok(__struct)
27706    }
27707    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27708        let mut __tmp = BytesMut::new(bytes);
27709        #[allow(clippy::absurd_extreme_comparisons)]
27710        #[allow(unused_comparisons)]
27711        if __tmp.remaining() < Self::ENCODED_LEN {
27712            panic!(
27713                "buffer is too small (need {} bytes, but got {})",
27714                Self::ENCODED_LEN,
27715                __tmp.remaining(),
27716            )
27717        }
27718        __tmp.put_f32_le(self.param1);
27719        __tmp.put_f32_le(self.param2);
27720        __tmp.put_f32_le(self.param3);
27721        __tmp.put_f32_le(self.param4);
27722        __tmp.put_f32_le(self.x);
27723        __tmp.put_f32_le(self.y);
27724        __tmp.put_f32_le(self.z);
27725        __tmp.put_u16_le(self.seq);
27726        __tmp.put_u16_le(self.command as u16);
27727        __tmp.put_u8(self.target_system);
27728        __tmp.put_u8(self.target_component);
27729        __tmp.put_u8(self.frame as u8);
27730        __tmp.put_u8(self.current);
27731        __tmp.put_u8(self.autocontinue);
27732        if matches!(version, MavlinkVersion::V2) {
27733            __tmp.put_u8(self.mission_type as u8);
27734            let len = __tmp.len();
27735            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27736        } else {
27737            __tmp.len()
27738        }
27739    }
27740}
27741#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
27742#[doc = ""]
27743#[doc = "ID: 73"]
27744#[derive(Debug, Clone, PartialEq)]
27745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27747#[cfg_attr(feature = "ts", derive(TS))]
27748#[cfg_attr(feature = "ts", ts(export))]
27749pub struct MISSION_ITEM_INT_DATA {
27750    #[doc = "PARAM1, see MAV_CMD enum"]
27751    pub param1: f32,
27752    #[doc = "PARAM2, see MAV_CMD enum"]
27753    pub param2: f32,
27754    #[doc = "PARAM3, see MAV_CMD enum"]
27755    pub param3: f32,
27756    #[doc = "PARAM4, see MAV_CMD enum"]
27757    pub param4: f32,
27758    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
27759    pub x: i32,
27760    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
27761    pub y: i32,
27762    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
27763    pub z: f32,
27764    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
27765    pub seq: u16,
27766    #[doc = "The scheduled action for the waypoint."]
27767    pub command: MavCmd,
27768    #[doc = "System ID"]
27769    pub target_system: u8,
27770    #[doc = "Component ID"]
27771    pub target_component: u8,
27772    #[doc = "The coordinate system of the waypoint."]
27773    pub frame: MavFrame,
27774    #[doc = "false:0, true:1"]
27775    pub current: u8,
27776    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
27777    pub autocontinue: u8,
27778    #[doc = "Mission type."]
27779    #[cfg_attr(feature = "serde", serde(default))]
27780    pub mission_type: MavMissionType,
27781}
27782impl MISSION_ITEM_INT_DATA {
27783    pub const ENCODED_LEN: usize = 38usize;
27784    pub const DEFAULT: Self = Self {
27785        param1: 0.0_f32,
27786        param2: 0.0_f32,
27787        param3: 0.0_f32,
27788        param4: 0.0_f32,
27789        x: 0_i32,
27790        y: 0_i32,
27791        z: 0.0_f32,
27792        seq: 0_u16,
27793        command: MavCmd::DEFAULT,
27794        target_system: 0_u8,
27795        target_component: 0_u8,
27796        frame: MavFrame::DEFAULT,
27797        current: 0_u8,
27798        autocontinue: 0_u8,
27799        mission_type: MavMissionType::DEFAULT,
27800    };
27801    #[cfg(feature = "arbitrary")]
27802    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27803        use arbitrary::{Arbitrary, Unstructured};
27804        let mut buf = [0u8; 1024];
27805        rng.fill_bytes(&mut buf);
27806        let mut unstructured = Unstructured::new(&buf);
27807        Self::arbitrary(&mut unstructured).unwrap_or_default()
27808    }
27809}
27810impl Default for MISSION_ITEM_INT_DATA {
27811    fn default() -> Self {
27812        Self::DEFAULT.clone()
27813    }
27814}
27815impl MessageData for MISSION_ITEM_INT_DATA {
27816    type Message = MavMessage;
27817    const ID: u32 = 73u32;
27818    const NAME: &'static str = "MISSION_ITEM_INT";
27819    const EXTRA_CRC: u8 = 38u8;
27820    const ENCODED_LEN: usize = 38usize;
27821    fn deser(
27822        _version: MavlinkVersion,
27823        __input: &[u8],
27824    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27825        let avail_len = __input.len();
27826        let mut payload_buf = [0; Self::ENCODED_LEN];
27827        let mut buf = if avail_len < Self::ENCODED_LEN {
27828            payload_buf[0..avail_len].copy_from_slice(__input);
27829            Bytes::new(&payload_buf)
27830        } else {
27831            Bytes::new(__input)
27832        };
27833        let mut __struct = Self::default();
27834        __struct.param1 = buf.get_f32_le()?;
27835        __struct.param2 = buf.get_f32_le()?;
27836        __struct.param3 = buf.get_f32_le()?;
27837        __struct.param4 = buf.get_f32_le()?;
27838        __struct.x = buf.get_i32_le()?;
27839        __struct.y = buf.get_i32_le()?;
27840        __struct.z = buf.get_f32_le()?;
27841        __struct.seq = buf.get_u16_le()?;
27842        let tmp = buf.get_u16_le()?;
27843        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
27844            ::mavlink_core::error::ParserError::InvalidEnum {
27845                enum_type: "MavCmd",
27846                value: tmp as u64,
27847            },
27848        )?;
27849        __struct.target_system = buf.get_u8()?;
27850        __struct.target_component = buf.get_u8()?;
27851        let tmp = buf.get_u8()?;
27852        __struct.frame =
27853            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27854                enum_type: "MavFrame",
27855                value: tmp as u64,
27856            })?;
27857        __struct.current = buf.get_u8()?;
27858        __struct.autocontinue = buf.get_u8()?;
27859        let tmp = buf.get_u8()?;
27860        __struct.mission_type =
27861            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27862                enum_type: "MavMissionType",
27863                value: tmp as u64,
27864            })?;
27865        Ok(__struct)
27866    }
27867    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27868        let mut __tmp = BytesMut::new(bytes);
27869        #[allow(clippy::absurd_extreme_comparisons)]
27870        #[allow(unused_comparisons)]
27871        if __tmp.remaining() < Self::ENCODED_LEN {
27872            panic!(
27873                "buffer is too small (need {} bytes, but got {})",
27874                Self::ENCODED_LEN,
27875                __tmp.remaining(),
27876            )
27877        }
27878        __tmp.put_f32_le(self.param1);
27879        __tmp.put_f32_le(self.param2);
27880        __tmp.put_f32_le(self.param3);
27881        __tmp.put_f32_le(self.param4);
27882        __tmp.put_i32_le(self.x);
27883        __tmp.put_i32_le(self.y);
27884        __tmp.put_f32_le(self.z);
27885        __tmp.put_u16_le(self.seq);
27886        __tmp.put_u16_le(self.command as u16);
27887        __tmp.put_u8(self.target_system);
27888        __tmp.put_u8(self.target_component);
27889        __tmp.put_u8(self.frame as u8);
27890        __tmp.put_u8(self.current);
27891        __tmp.put_u8(self.autocontinue);
27892        if matches!(version, MavlinkVersion::V2) {
27893            __tmp.put_u8(self.mission_type as u8);
27894            let len = __tmp.len();
27895            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27896        } else {
27897            __tmp.len()
27898        }
27899    }
27900}
27901#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
27902#[doc = ""]
27903#[doc = "ID: 46"]
27904#[derive(Debug, Clone, PartialEq)]
27905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27906#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27907#[cfg_attr(feature = "ts", derive(TS))]
27908#[cfg_attr(feature = "ts", ts(export))]
27909pub struct MISSION_ITEM_REACHED_DATA {
27910    #[doc = "Sequence"]
27911    pub seq: u16,
27912}
27913impl MISSION_ITEM_REACHED_DATA {
27914    pub const ENCODED_LEN: usize = 2usize;
27915    pub const DEFAULT: Self = Self { seq: 0_u16 };
27916    #[cfg(feature = "arbitrary")]
27917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27918        use arbitrary::{Arbitrary, Unstructured};
27919        let mut buf = [0u8; 1024];
27920        rng.fill_bytes(&mut buf);
27921        let mut unstructured = Unstructured::new(&buf);
27922        Self::arbitrary(&mut unstructured).unwrap_or_default()
27923    }
27924}
27925impl Default for MISSION_ITEM_REACHED_DATA {
27926    fn default() -> Self {
27927        Self::DEFAULT.clone()
27928    }
27929}
27930impl MessageData for MISSION_ITEM_REACHED_DATA {
27931    type Message = MavMessage;
27932    const ID: u32 = 46u32;
27933    const NAME: &'static str = "MISSION_ITEM_REACHED";
27934    const EXTRA_CRC: u8 = 11u8;
27935    const ENCODED_LEN: usize = 2usize;
27936    fn deser(
27937        _version: MavlinkVersion,
27938        __input: &[u8],
27939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27940        let avail_len = __input.len();
27941        let mut payload_buf = [0; Self::ENCODED_LEN];
27942        let mut buf = if avail_len < Self::ENCODED_LEN {
27943            payload_buf[0..avail_len].copy_from_slice(__input);
27944            Bytes::new(&payload_buf)
27945        } else {
27946            Bytes::new(__input)
27947        };
27948        let mut __struct = Self::default();
27949        __struct.seq = buf.get_u16_le()?;
27950        Ok(__struct)
27951    }
27952    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27953        let mut __tmp = BytesMut::new(bytes);
27954        #[allow(clippy::absurd_extreme_comparisons)]
27955        #[allow(unused_comparisons)]
27956        if __tmp.remaining() < Self::ENCODED_LEN {
27957            panic!(
27958                "buffer is too small (need {} bytes, but got {})",
27959                Self::ENCODED_LEN,
27960                __tmp.remaining(),
27961            )
27962        }
27963        __tmp.put_u16_le(self.seq);
27964        if matches!(version, MavlinkVersion::V2) {
27965            let len = __tmp.len();
27966            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27967        } else {
27968            __tmp.len()
27969        }
27970    }
27971}
27972#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
27973#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
27974#[doc = ""]
27975#[doc = "ID: 40"]
27976#[derive(Debug, Clone, PartialEq)]
27977#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27978#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27979#[cfg_attr(feature = "ts", derive(TS))]
27980#[cfg_attr(feature = "ts", ts(export))]
27981pub struct MISSION_REQUEST_DATA {
27982    #[doc = "Sequence"]
27983    pub seq: u16,
27984    #[doc = "System ID"]
27985    pub target_system: u8,
27986    #[doc = "Component ID"]
27987    pub target_component: u8,
27988    #[doc = "Mission type."]
27989    #[cfg_attr(feature = "serde", serde(default))]
27990    pub mission_type: MavMissionType,
27991}
27992impl MISSION_REQUEST_DATA {
27993    pub const ENCODED_LEN: usize = 5usize;
27994    pub const DEFAULT: Self = Self {
27995        seq: 0_u16,
27996        target_system: 0_u8,
27997        target_component: 0_u8,
27998        mission_type: MavMissionType::DEFAULT,
27999    };
28000    #[cfg(feature = "arbitrary")]
28001    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28002        use arbitrary::{Arbitrary, Unstructured};
28003        let mut buf = [0u8; 1024];
28004        rng.fill_bytes(&mut buf);
28005        let mut unstructured = Unstructured::new(&buf);
28006        Self::arbitrary(&mut unstructured).unwrap_or_default()
28007    }
28008}
28009impl Default for MISSION_REQUEST_DATA {
28010    fn default() -> Self {
28011        Self::DEFAULT.clone()
28012    }
28013}
28014impl MessageData for MISSION_REQUEST_DATA {
28015    type Message = MavMessage;
28016    const ID: u32 = 40u32;
28017    const NAME: &'static str = "MISSION_REQUEST";
28018    const EXTRA_CRC: u8 = 230u8;
28019    const ENCODED_LEN: usize = 5usize;
28020    fn deser(
28021        _version: MavlinkVersion,
28022        __input: &[u8],
28023    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28024        let avail_len = __input.len();
28025        let mut payload_buf = [0; Self::ENCODED_LEN];
28026        let mut buf = if avail_len < Self::ENCODED_LEN {
28027            payload_buf[0..avail_len].copy_from_slice(__input);
28028            Bytes::new(&payload_buf)
28029        } else {
28030            Bytes::new(__input)
28031        };
28032        let mut __struct = Self::default();
28033        __struct.seq = buf.get_u16_le()?;
28034        __struct.target_system = buf.get_u8()?;
28035        __struct.target_component = buf.get_u8()?;
28036        let tmp = buf.get_u8()?;
28037        __struct.mission_type =
28038            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28039                enum_type: "MavMissionType",
28040                value: tmp as u64,
28041            })?;
28042        Ok(__struct)
28043    }
28044    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28045        let mut __tmp = BytesMut::new(bytes);
28046        #[allow(clippy::absurd_extreme_comparisons)]
28047        #[allow(unused_comparisons)]
28048        if __tmp.remaining() < Self::ENCODED_LEN {
28049            panic!(
28050                "buffer is too small (need {} bytes, but got {})",
28051                Self::ENCODED_LEN,
28052                __tmp.remaining(),
28053            )
28054        }
28055        __tmp.put_u16_le(self.seq);
28056        __tmp.put_u8(self.target_system);
28057        __tmp.put_u8(self.target_component);
28058        if matches!(version, MavlinkVersion::V2) {
28059            __tmp.put_u8(self.mission_type as u8);
28060            let len = __tmp.len();
28061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28062        } else {
28063            __tmp.len()
28064        }
28065    }
28066}
28067#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
28068#[doc = ""]
28069#[doc = "ID: 51"]
28070#[derive(Debug, Clone, PartialEq)]
28071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28073#[cfg_attr(feature = "ts", derive(TS))]
28074#[cfg_attr(feature = "ts", ts(export))]
28075pub struct MISSION_REQUEST_INT_DATA {
28076    #[doc = "Sequence"]
28077    pub seq: u16,
28078    #[doc = "System ID"]
28079    pub target_system: u8,
28080    #[doc = "Component ID"]
28081    pub target_component: u8,
28082    #[doc = "Mission type."]
28083    #[cfg_attr(feature = "serde", serde(default))]
28084    pub mission_type: MavMissionType,
28085}
28086impl MISSION_REQUEST_INT_DATA {
28087    pub const ENCODED_LEN: usize = 5usize;
28088    pub const DEFAULT: Self = Self {
28089        seq: 0_u16,
28090        target_system: 0_u8,
28091        target_component: 0_u8,
28092        mission_type: MavMissionType::DEFAULT,
28093    };
28094    #[cfg(feature = "arbitrary")]
28095    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28096        use arbitrary::{Arbitrary, Unstructured};
28097        let mut buf = [0u8; 1024];
28098        rng.fill_bytes(&mut buf);
28099        let mut unstructured = Unstructured::new(&buf);
28100        Self::arbitrary(&mut unstructured).unwrap_or_default()
28101    }
28102}
28103impl Default for MISSION_REQUEST_INT_DATA {
28104    fn default() -> Self {
28105        Self::DEFAULT.clone()
28106    }
28107}
28108impl MessageData for MISSION_REQUEST_INT_DATA {
28109    type Message = MavMessage;
28110    const ID: u32 = 51u32;
28111    const NAME: &'static str = "MISSION_REQUEST_INT";
28112    const EXTRA_CRC: u8 = 196u8;
28113    const ENCODED_LEN: usize = 5usize;
28114    fn deser(
28115        _version: MavlinkVersion,
28116        __input: &[u8],
28117    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28118        let avail_len = __input.len();
28119        let mut payload_buf = [0; Self::ENCODED_LEN];
28120        let mut buf = if avail_len < Self::ENCODED_LEN {
28121            payload_buf[0..avail_len].copy_from_slice(__input);
28122            Bytes::new(&payload_buf)
28123        } else {
28124            Bytes::new(__input)
28125        };
28126        let mut __struct = Self::default();
28127        __struct.seq = buf.get_u16_le()?;
28128        __struct.target_system = buf.get_u8()?;
28129        __struct.target_component = buf.get_u8()?;
28130        let tmp = buf.get_u8()?;
28131        __struct.mission_type =
28132            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28133                enum_type: "MavMissionType",
28134                value: tmp as u64,
28135            })?;
28136        Ok(__struct)
28137    }
28138    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28139        let mut __tmp = BytesMut::new(bytes);
28140        #[allow(clippy::absurd_extreme_comparisons)]
28141        #[allow(unused_comparisons)]
28142        if __tmp.remaining() < Self::ENCODED_LEN {
28143            panic!(
28144                "buffer is too small (need {} bytes, but got {})",
28145                Self::ENCODED_LEN,
28146                __tmp.remaining(),
28147            )
28148        }
28149        __tmp.put_u16_le(self.seq);
28150        __tmp.put_u8(self.target_system);
28151        __tmp.put_u8(self.target_component);
28152        if matches!(version, MavlinkVersion::V2) {
28153            __tmp.put_u8(self.mission_type as u8);
28154            let len = __tmp.len();
28155            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28156        } else {
28157            __tmp.len()
28158        }
28159    }
28160}
28161#[doc = "Request the overall list of mission items from the system/component."]
28162#[doc = ""]
28163#[doc = "ID: 43"]
28164#[derive(Debug, Clone, PartialEq)]
28165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28167#[cfg_attr(feature = "ts", derive(TS))]
28168#[cfg_attr(feature = "ts", ts(export))]
28169pub struct MISSION_REQUEST_LIST_DATA {
28170    #[doc = "System ID"]
28171    pub target_system: u8,
28172    #[doc = "Component ID"]
28173    pub target_component: u8,
28174    #[doc = "Mission type."]
28175    #[cfg_attr(feature = "serde", serde(default))]
28176    pub mission_type: MavMissionType,
28177}
28178impl MISSION_REQUEST_LIST_DATA {
28179    pub const ENCODED_LEN: usize = 3usize;
28180    pub const DEFAULT: Self = Self {
28181        target_system: 0_u8,
28182        target_component: 0_u8,
28183        mission_type: MavMissionType::DEFAULT,
28184    };
28185    #[cfg(feature = "arbitrary")]
28186    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28187        use arbitrary::{Arbitrary, Unstructured};
28188        let mut buf = [0u8; 1024];
28189        rng.fill_bytes(&mut buf);
28190        let mut unstructured = Unstructured::new(&buf);
28191        Self::arbitrary(&mut unstructured).unwrap_or_default()
28192    }
28193}
28194impl Default for MISSION_REQUEST_LIST_DATA {
28195    fn default() -> Self {
28196        Self::DEFAULT.clone()
28197    }
28198}
28199impl MessageData for MISSION_REQUEST_LIST_DATA {
28200    type Message = MavMessage;
28201    const ID: u32 = 43u32;
28202    const NAME: &'static str = "MISSION_REQUEST_LIST";
28203    const EXTRA_CRC: u8 = 132u8;
28204    const ENCODED_LEN: usize = 3usize;
28205    fn deser(
28206        _version: MavlinkVersion,
28207        __input: &[u8],
28208    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28209        let avail_len = __input.len();
28210        let mut payload_buf = [0; Self::ENCODED_LEN];
28211        let mut buf = if avail_len < Self::ENCODED_LEN {
28212            payload_buf[0..avail_len].copy_from_slice(__input);
28213            Bytes::new(&payload_buf)
28214        } else {
28215            Bytes::new(__input)
28216        };
28217        let mut __struct = Self::default();
28218        __struct.target_system = buf.get_u8()?;
28219        __struct.target_component = buf.get_u8()?;
28220        let tmp = buf.get_u8()?;
28221        __struct.mission_type =
28222            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28223                enum_type: "MavMissionType",
28224                value: tmp as u64,
28225            })?;
28226        Ok(__struct)
28227    }
28228    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28229        let mut __tmp = BytesMut::new(bytes);
28230        #[allow(clippy::absurd_extreme_comparisons)]
28231        #[allow(unused_comparisons)]
28232        if __tmp.remaining() < Self::ENCODED_LEN {
28233            panic!(
28234                "buffer is too small (need {} bytes, but got {})",
28235                Self::ENCODED_LEN,
28236                __tmp.remaining(),
28237            )
28238        }
28239        __tmp.put_u8(self.target_system);
28240        __tmp.put_u8(self.target_component);
28241        if matches!(version, MavlinkVersion::V2) {
28242            __tmp.put_u8(self.mission_type as u8);
28243            let len = __tmp.len();
28244            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28245        } else {
28246            __tmp.len()
28247        }
28248    }
28249}
28250#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
28251#[doc = ""]
28252#[doc = "ID: 37"]
28253#[derive(Debug, Clone, PartialEq)]
28254#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28256#[cfg_attr(feature = "ts", derive(TS))]
28257#[cfg_attr(feature = "ts", ts(export))]
28258pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
28259    #[doc = "Start index"]
28260    pub start_index: i16,
28261    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
28262    pub end_index: i16,
28263    #[doc = "System ID"]
28264    pub target_system: u8,
28265    #[doc = "Component ID"]
28266    pub target_component: u8,
28267    #[doc = "Mission type."]
28268    #[cfg_attr(feature = "serde", serde(default))]
28269    pub mission_type: MavMissionType,
28270}
28271impl MISSION_REQUEST_PARTIAL_LIST_DATA {
28272    pub const ENCODED_LEN: usize = 7usize;
28273    pub const DEFAULT: Self = Self {
28274        start_index: 0_i16,
28275        end_index: 0_i16,
28276        target_system: 0_u8,
28277        target_component: 0_u8,
28278        mission_type: MavMissionType::DEFAULT,
28279    };
28280    #[cfg(feature = "arbitrary")]
28281    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28282        use arbitrary::{Arbitrary, Unstructured};
28283        let mut buf = [0u8; 1024];
28284        rng.fill_bytes(&mut buf);
28285        let mut unstructured = Unstructured::new(&buf);
28286        Self::arbitrary(&mut unstructured).unwrap_or_default()
28287    }
28288}
28289impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
28290    fn default() -> Self {
28291        Self::DEFAULT.clone()
28292    }
28293}
28294impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
28295    type Message = MavMessage;
28296    const ID: u32 = 37u32;
28297    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
28298    const EXTRA_CRC: u8 = 212u8;
28299    const ENCODED_LEN: usize = 7usize;
28300    fn deser(
28301        _version: MavlinkVersion,
28302        __input: &[u8],
28303    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28304        let avail_len = __input.len();
28305        let mut payload_buf = [0; Self::ENCODED_LEN];
28306        let mut buf = if avail_len < Self::ENCODED_LEN {
28307            payload_buf[0..avail_len].copy_from_slice(__input);
28308            Bytes::new(&payload_buf)
28309        } else {
28310            Bytes::new(__input)
28311        };
28312        let mut __struct = Self::default();
28313        __struct.start_index = buf.get_i16_le()?;
28314        __struct.end_index = buf.get_i16_le()?;
28315        __struct.target_system = buf.get_u8()?;
28316        __struct.target_component = buf.get_u8()?;
28317        let tmp = buf.get_u8()?;
28318        __struct.mission_type =
28319            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28320                enum_type: "MavMissionType",
28321                value: tmp as u64,
28322            })?;
28323        Ok(__struct)
28324    }
28325    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28326        let mut __tmp = BytesMut::new(bytes);
28327        #[allow(clippy::absurd_extreme_comparisons)]
28328        #[allow(unused_comparisons)]
28329        if __tmp.remaining() < Self::ENCODED_LEN {
28330            panic!(
28331                "buffer is too small (need {} bytes, but got {})",
28332                Self::ENCODED_LEN,
28333                __tmp.remaining(),
28334            )
28335        }
28336        __tmp.put_i16_le(self.start_index);
28337        __tmp.put_i16_le(self.end_index);
28338        __tmp.put_u8(self.target_system);
28339        __tmp.put_u8(self.target_component);
28340        if matches!(version, MavlinkVersion::V2) {
28341            __tmp.put_u8(self.mission_type as u8);
28342            let len = __tmp.len();
28343            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28344        } else {
28345            __tmp.len()
28346        }
28347    }
28348}
28349#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
28350#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
28351#[doc = ""]
28352#[doc = "ID: 41"]
28353#[derive(Debug, Clone, PartialEq)]
28354#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28355#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28356#[cfg_attr(feature = "ts", derive(TS))]
28357#[cfg_attr(feature = "ts", ts(export))]
28358pub struct MISSION_SET_CURRENT_DATA {
28359    #[doc = "Sequence"]
28360    pub seq: u16,
28361    #[doc = "System ID"]
28362    pub target_system: u8,
28363    #[doc = "Component ID"]
28364    pub target_component: u8,
28365}
28366impl MISSION_SET_CURRENT_DATA {
28367    pub const ENCODED_LEN: usize = 4usize;
28368    pub const DEFAULT: Self = Self {
28369        seq: 0_u16,
28370        target_system: 0_u8,
28371        target_component: 0_u8,
28372    };
28373    #[cfg(feature = "arbitrary")]
28374    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28375        use arbitrary::{Arbitrary, Unstructured};
28376        let mut buf = [0u8; 1024];
28377        rng.fill_bytes(&mut buf);
28378        let mut unstructured = Unstructured::new(&buf);
28379        Self::arbitrary(&mut unstructured).unwrap_or_default()
28380    }
28381}
28382impl Default for MISSION_SET_CURRENT_DATA {
28383    fn default() -> Self {
28384        Self::DEFAULT.clone()
28385    }
28386}
28387impl MessageData for MISSION_SET_CURRENT_DATA {
28388    type Message = MavMessage;
28389    const ID: u32 = 41u32;
28390    const NAME: &'static str = "MISSION_SET_CURRENT";
28391    const EXTRA_CRC: u8 = 28u8;
28392    const ENCODED_LEN: usize = 4usize;
28393    fn deser(
28394        _version: MavlinkVersion,
28395        __input: &[u8],
28396    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28397        let avail_len = __input.len();
28398        let mut payload_buf = [0; Self::ENCODED_LEN];
28399        let mut buf = if avail_len < Self::ENCODED_LEN {
28400            payload_buf[0..avail_len].copy_from_slice(__input);
28401            Bytes::new(&payload_buf)
28402        } else {
28403            Bytes::new(__input)
28404        };
28405        let mut __struct = Self::default();
28406        __struct.seq = buf.get_u16_le()?;
28407        __struct.target_system = buf.get_u8()?;
28408        __struct.target_component = buf.get_u8()?;
28409        Ok(__struct)
28410    }
28411    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28412        let mut __tmp = BytesMut::new(bytes);
28413        #[allow(clippy::absurd_extreme_comparisons)]
28414        #[allow(unused_comparisons)]
28415        if __tmp.remaining() < Self::ENCODED_LEN {
28416            panic!(
28417                "buffer is too small (need {} bytes, but got {})",
28418                Self::ENCODED_LEN,
28419                __tmp.remaining(),
28420            )
28421        }
28422        __tmp.put_u16_le(self.seq);
28423        __tmp.put_u8(self.target_system);
28424        __tmp.put_u8(self.target_component);
28425        if matches!(version, MavlinkVersion::V2) {
28426            let len = __tmp.len();
28427            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28428        } else {
28429            __tmp.len()
28430        }
28431    }
28432}
28433#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
28434#[doc = ""]
28435#[doc = "ID: 38"]
28436#[derive(Debug, Clone, PartialEq)]
28437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28439#[cfg_attr(feature = "ts", derive(TS))]
28440#[cfg_attr(feature = "ts", ts(export))]
28441pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
28442    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
28443    pub start_index: i16,
28444    #[doc = "End index, equal or greater than start index."]
28445    pub end_index: i16,
28446    #[doc = "System ID"]
28447    pub target_system: u8,
28448    #[doc = "Component ID"]
28449    pub target_component: u8,
28450    #[doc = "Mission type."]
28451    #[cfg_attr(feature = "serde", serde(default))]
28452    pub mission_type: MavMissionType,
28453}
28454impl MISSION_WRITE_PARTIAL_LIST_DATA {
28455    pub const ENCODED_LEN: usize = 7usize;
28456    pub const DEFAULT: Self = Self {
28457        start_index: 0_i16,
28458        end_index: 0_i16,
28459        target_system: 0_u8,
28460        target_component: 0_u8,
28461        mission_type: MavMissionType::DEFAULT,
28462    };
28463    #[cfg(feature = "arbitrary")]
28464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28465        use arbitrary::{Arbitrary, Unstructured};
28466        let mut buf = [0u8; 1024];
28467        rng.fill_bytes(&mut buf);
28468        let mut unstructured = Unstructured::new(&buf);
28469        Self::arbitrary(&mut unstructured).unwrap_or_default()
28470    }
28471}
28472impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
28473    fn default() -> Self {
28474        Self::DEFAULT.clone()
28475    }
28476}
28477impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
28478    type Message = MavMessage;
28479    const ID: u32 = 38u32;
28480    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
28481    const EXTRA_CRC: u8 = 9u8;
28482    const ENCODED_LEN: usize = 7usize;
28483    fn deser(
28484        _version: MavlinkVersion,
28485        __input: &[u8],
28486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28487        let avail_len = __input.len();
28488        let mut payload_buf = [0; Self::ENCODED_LEN];
28489        let mut buf = if avail_len < Self::ENCODED_LEN {
28490            payload_buf[0..avail_len].copy_from_slice(__input);
28491            Bytes::new(&payload_buf)
28492        } else {
28493            Bytes::new(__input)
28494        };
28495        let mut __struct = Self::default();
28496        __struct.start_index = buf.get_i16_le()?;
28497        __struct.end_index = buf.get_i16_le()?;
28498        __struct.target_system = buf.get_u8()?;
28499        __struct.target_component = buf.get_u8()?;
28500        let tmp = buf.get_u8()?;
28501        __struct.mission_type =
28502            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28503                enum_type: "MavMissionType",
28504                value: tmp as u64,
28505            })?;
28506        Ok(__struct)
28507    }
28508    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28509        let mut __tmp = BytesMut::new(bytes);
28510        #[allow(clippy::absurd_extreme_comparisons)]
28511        #[allow(unused_comparisons)]
28512        if __tmp.remaining() < Self::ENCODED_LEN {
28513            panic!(
28514                "buffer is too small (need {} bytes, but got {})",
28515                Self::ENCODED_LEN,
28516                __tmp.remaining(),
28517            )
28518        }
28519        __tmp.put_i16_le(self.start_index);
28520        __tmp.put_i16_le(self.end_index);
28521        __tmp.put_u8(self.target_system);
28522        __tmp.put_u8(self.target_component);
28523        if matches!(version, MavlinkVersion::V2) {
28524            __tmp.put_u8(self.mission_type as u8);
28525            let len = __tmp.len();
28526            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28527        } else {
28528            __tmp.len()
28529        }
28530    }
28531}
28532#[doc = "Message to configure a camera mount, directional antenna, etc."]
28533#[doc = ""]
28534#[doc = "ID: 156"]
28535#[derive(Debug, Clone, PartialEq)]
28536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28538#[cfg_attr(feature = "ts", derive(TS))]
28539#[cfg_attr(feature = "ts", ts(export))]
28540pub struct MOUNT_CONFIGURE_DATA {
28541    #[doc = "System ID."]
28542    pub target_system: u8,
28543    #[doc = "Component ID."]
28544    pub target_component: u8,
28545    #[doc = "Mount operating mode."]
28546    pub mount_mode: MavMountMode,
28547    #[doc = "(1 = yes, 0 = no)."]
28548    pub stab_roll: u8,
28549    #[doc = "(1 = yes, 0 = no)."]
28550    pub stab_pitch: u8,
28551    #[doc = "(1 = yes, 0 = no)."]
28552    pub stab_yaw: u8,
28553}
28554impl MOUNT_CONFIGURE_DATA {
28555    pub const ENCODED_LEN: usize = 6usize;
28556    pub const DEFAULT: Self = Self {
28557        target_system: 0_u8,
28558        target_component: 0_u8,
28559        mount_mode: MavMountMode::DEFAULT,
28560        stab_roll: 0_u8,
28561        stab_pitch: 0_u8,
28562        stab_yaw: 0_u8,
28563    };
28564    #[cfg(feature = "arbitrary")]
28565    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28566        use arbitrary::{Arbitrary, Unstructured};
28567        let mut buf = [0u8; 1024];
28568        rng.fill_bytes(&mut buf);
28569        let mut unstructured = Unstructured::new(&buf);
28570        Self::arbitrary(&mut unstructured).unwrap_or_default()
28571    }
28572}
28573impl Default for MOUNT_CONFIGURE_DATA {
28574    fn default() -> Self {
28575        Self::DEFAULT.clone()
28576    }
28577}
28578impl MessageData for MOUNT_CONFIGURE_DATA {
28579    type Message = MavMessage;
28580    const ID: u32 = 156u32;
28581    const NAME: &'static str = "MOUNT_CONFIGURE";
28582    const EXTRA_CRC: u8 = 19u8;
28583    const ENCODED_LEN: usize = 6usize;
28584    fn deser(
28585        _version: MavlinkVersion,
28586        __input: &[u8],
28587    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28588        let avail_len = __input.len();
28589        let mut payload_buf = [0; Self::ENCODED_LEN];
28590        let mut buf = if avail_len < Self::ENCODED_LEN {
28591            payload_buf[0..avail_len].copy_from_slice(__input);
28592            Bytes::new(&payload_buf)
28593        } else {
28594            Bytes::new(__input)
28595        };
28596        let mut __struct = Self::default();
28597        __struct.target_system = buf.get_u8()?;
28598        __struct.target_component = buf.get_u8()?;
28599        let tmp = buf.get_u8()?;
28600        __struct.mount_mode =
28601            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28602                enum_type: "MavMountMode",
28603                value: tmp as u64,
28604            })?;
28605        __struct.stab_roll = buf.get_u8()?;
28606        __struct.stab_pitch = buf.get_u8()?;
28607        __struct.stab_yaw = buf.get_u8()?;
28608        Ok(__struct)
28609    }
28610    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28611        let mut __tmp = BytesMut::new(bytes);
28612        #[allow(clippy::absurd_extreme_comparisons)]
28613        #[allow(unused_comparisons)]
28614        if __tmp.remaining() < Self::ENCODED_LEN {
28615            panic!(
28616                "buffer is too small (need {} bytes, but got {})",
28617                Self::ENCODED_LEN,
28618                __tmp.remaining(),
28619            )
28620        }
28621        __tmp.put_u8(self.target_system);
28622        __tmp.put_u8(self.target_component);
28623        __tmp.put_u8(self.mount_mode as u8);
28624        __tmp.put_u8(self.stab_roll);
28625        __tmp.put_u8(self.stab_pitch);
28626        __tmp.put_u8(self.stab_yaw);
28627        if matches!(version, MavlinkVersion::V2) {
28628            let len = __tmp.len();
28629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28630        } else {
28631            __tmp.len()
28632        }
28633    }
28634}
28635#[doc = "Message to control a camera mount, directional antenna, etc."]
28636#[doc = ""]
28637#[doc = "ID: 157"]
28638#[derive(Debug, Clone, PartialEq)]
28639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28641#[cfg_attr(feature = "ts", derive(TS))]
28642#[cfg_attr(feature = "ts", ts(export))]
28643pub struct MOUNT_CONTROL_DATA {
28644    #[doc = "Pitch (centi-degrees) or lat (degE7), depending on mount mode."]
28645    pub input_a: i32,
28646    #[doc = "Roll (centi-degrees) or lon (degE7) depending on mount mode."]
28647    pub input_b: i32,
28648    #[doc = "Yaw (centi-degrees) or alt (cm) depending on mount mode."]
28649    pub input_c: i32,
28650    #[doc = "System ID."]
28651    pub target_system: u8,
28652    #[doc = "Component ID."]
28653    pub target_component: u8,
28654    #[doc = "If \"1\" it will save current trimmed position on EEPROM (just valid for NEUTRAL and LANDING)."]
28655    pub save_position: u8,
28656}
28657impl MOUNT_CONTROL_DATA {
28658    pub const ENCODED_LEN: usize = 15usize;
28659    pub const DEFAULT: Self = Self {
28660        input_a: 0_i32,
28661        input_b: 0_i32,
28662        input_c: 0_i32,
28663        target_system: 0_u8,
28664        target_component: 0_u8,
28665        save_position: 0_u8,
28666    };
28667    #[cfg(feature = "arbitrary")]
28668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28669        use arbitrary::{Arbitrary, Unstructured};
28670        let mut buf = [0u8; 1024];
28671        rng.fill_bytes(&mut buf);
28672        let mut unstructured = Unstructured::new(&buf);
28673        Self::arbitrary(&mut unstructured).unwrap_or_default()
28674    }
28675}
28676impl Default for MOUNT_CONTROL_DATA {
28677    fn default() -> Self {
28678        Self::DEFAULT.clone()
28679    }
28680}
28681impl MessageData for MOUNT_CONTROL_DATA {
28682    type Message = MavMessage;
28683    const ID: u32 = 157u32;
28684    const NAME: &'static str = "MOUNT_CONTROL";
28685    const EXTRA_CRC: u8 = 21u8;
28686    const ENCODED_LEN: usize = 15usize;
28687    fn deser(
28688        _version: MavlinkVersion,
28689        __input: &[u8],
28690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28691        let avail_len = __input.len();
28692        let mut payload_buf = [0; Self::ENCODED_LEN];
28693        let mut buf = if avail_len < Self::ENCODED_LEN {
28694            payload_buf[0..avail_len].copy_from_slice(__input);
28695            Bytes::new(&payload_buf)
28696        } else {
28697            Bytes::new(__input)
28698        };
28699        let mut __struct = Self::default();
28700        __struct.input_a = buf.get_i32_le()?;
28701        __struct.input_b = buf.get_i32_le()?;
28702        __struct.input_c = buf.get_i32_le()?;
28703        __struct.target_system = buf.get_u8()?;
28704        __struct.target_component = buf.get_u8()?;
28705        __struct.save_position = buf.get_u8()?;
28706        Ok(__struct)
28707    }
28708    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28709        let mut __tmp = BytesMut::new(bytes);
28710        #[allow(clippy::absurd_extreme_comparisons)]
28711        #[allow(unused_comparisons)]
28712        if __tmp.remaining() < Self::ENCODED_LEN {
28713            panic!(
28714                "buffer is too small (need {} bytes, but got {})",
28715                Self::ENCODED_LEN,
28716                __tmp.remaining(),
28717            )
28718        }
28719        __tmp.put_i32_le(self.input_a);
28720        __tmp.put_i32_le(self.input_b);
28721        __tmp.put_i32_le(self.input_c);
28722        __tmp.put_u8(self.target_system);
28723        __tmp.put_u8(self.target_component);
28724        __tmp.put_u8(self.save_position);
28725        if matches!(version, MavlinkVersion::V2) {
28726            let len = __tmp.len();
28727            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28728        } else {
28729            __tmp.len()
28730        }
28731    }
28732}
28733#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
28734#[doc = "Orientation of a mount."]
28735#[doc = ""]
28736#[doc = "ID: 265"]
28737#[derive(Debug, Clone, PartialEq)]
28738#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28739#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28740#[cfg_attr(feature = "ts", derive(TS))]
28741#[cfg_attr(feature = "ts", ts(export))]
28742pub struct MOUNT_ORIENTATION_DATA {
28743    #[doc = "Timestamp (time since system boot)."]
28744    pub time_boot_ms: u32,
28745    #[doc = "Roll in global frame (set to NaN for invalid)."]
28746    pub roll: f32,
28747    #[doc = "Pitch in global frame (set to NaN for invalid)."]
28748    pub pitch: f32,
28749    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
28750    pub yaw: f32,
28751    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
28752    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28753    pub yaw_absolute: f32,
28754}
28755impl MOUNT_ORIENTATION_DATA {
28756    pub const ENCODED_LEN: usize = 20usize;
28757    pub const DEFAULT: Self = Self {
28758        time_boot_ms: 0_u32,
28759        roll: 0.0_f32,
28760        pitch: 0.0_f32,
28761        yaw: 0.0_f32,
28762        yaw_absolute: 0.0_f32,
28763    };
28764    #[cfg(feature = "arbitrary")]
28765    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28766        use arbitrary::{Arbitrary, Unstructured};
28767        let mut buf = [0u8; 1024];
28768        rng.fill_bytes(&mut buf);
28769        let mut unstructured = Unstructured::new(&buf);
28770        Self::arbitrary(&mut unstructured).unwrap_or_default()
28771    }
28772}
28773impl Default for MOUNT_ORIENTATION_DATA {
28774    fn default() -> Self {
28775        Self::DEFAULT.clone()
28776    }
28777}
28778impl MessageData for MOUNT_ORIENTATION_DATA {
28779    type Message = MavMessage;
28780    const ID: u32 = 265u32;
28781    const NAME: &'static str = "MOUNT_ORIENTATION";
28782    const EXTRA_CRC: u8 = 26u8;
28783    const ENCODED_LEN: usize = 20usize;
28784    fn deser(
28785        _version: MavlinkVersion,
28786        __input: &[u8],
28787    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28788        let avail_len = __input.len();
28789        let mut payload_buf = [0; Self::ENCODED_LEN];
28790        let mut buf = if avail_len < Self::ENCODED_LEN {
28791            payload_buf[0..avail_len].copy_from_slice(__input);
28792            Bytes::new(&payload_buf)
28793        } else {
28794            Bytes::new(__input)
28795        };
28796        let mut __struct = Self::default();
28797        __struct.time_boot_ms = buf.get_u32_le()?;
28798        __struct.roll = buf.get_f32_le()?;
28799        __struct.pitch = buf.get_f32_le()?;
28800        __struct.yaw = buf.get_f32_le()?;
28801        __struct.yaw_absolute = buf.get_f32_le()?;
28802        Ok(__struct)
28803    }
28804    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28805        let mut __tmp = BytesMut::new(bytes);
28806        #[allow(clippy::absurd_extreme_comparisons)]
28807        #[allow(unused_comparisons)]
28808        if __tmp.remaining() < Self::ENCODED_LEN {
28809            panic!(
28810                "buffer is too small (need {} bytes, but got {})",
28811                Self::ENCODED_LEN,
28812                __tmp.remaining(),
28813            )
28814        }
28815        __tmp.put_u32_le(self.time_boot_ms);
28816        __tmp.put_f32_le(self.roll);
28817        __tmp.put_f32_le(self.pitch);
28818        __tmp.put_f32_le(self.yaw);
28819        if matches!(version, MavlinkVersion::V2) {
28820            __tmp.put_f32_le(self.yaw_absolute);
28821            let len = __tmp.len();
28822            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28823        } else {
28824            __tmp.len()
28825        }
28826    }
28827}
28828#[doc = "Message with some status from autopilot to GCS about camera or antenna mount."]
28829#[doc = ""]
28830#[doc = "ID: 158"]
28831#[derive(Debug, Clone, PartialEq)]
28832#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28833#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28834#[cfg_attr(feature = "ts", derive(TS))]
28835#[cfg_attr(feature = "ts", ts(export))]
28836pub struct MOUNT_STATUS_DATA {
28837    #[doc = "Pitch."]
28838    pub pointing_a: i32,
28839    #[doc = "Roll."]
28840    pub pointing_b: i32,
28841    #[doc = "Yaw."]
28842    pub pointing_c: i32,
28843    #[doc = "System ID."]
28844    pub target_system: u8,
28845    #[doc = "Component ID."]
28846    pub target_component: u8,
28847    #[doc = "Mount operating mode."]
28848    #[cfg_attr(feature = "serde", serde(default))]
28849    pub mount_mode: MavMountMode,
28850}
28851impl MOUNT_STATUS_DATA {
28852    pub const ENCODED_LEN: usize = 15usize;
28853    pub const DEFAULT: Self = Self {
28854        pointing_a: 0_i32,
28855        pointing_b: 0_i32,
28856        pointing_c: 0_i32,
28857        target_system: 0_u8,
28858        target_component: 0_u8,
28859        mount_mode: MavMountMode::DEFAULT,
28860    };
28861    #[cfg(feature = "arbitrary")]
28862    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28863        use arbitrary::{Arbitrary, Unstructured};
28864        let mut buf = [0u8; 1024];
28865        rng.fill_bytes(&mut buf);
28866        let mut unstructured = Unstructured::new(&buf);
28867        Self::arbitrary(&mut unstructured).unwrap_or_default()
28868    }
28869}
28870impl Default for MOUNT_STATUS_DATA {
28871    fn default() -> Self {
28872        Self::DEFAULT.clone()
28873    }
28874}
28875impl MessageData for MOUNT_STATUS_DATA {
28876    type Message = MavMessage;
28877    const ID: u32 = 158u32;
28878    const NAME: &'static str = "MOUNT_STATUS";
28879    const EXTRA_CRC: u8 = 134u8;
28880    const ENCODED_LEN: usize = 15usize;
28881    fn deser(
28882        _version: MavlinkVersion,
28883        __input: &[u8],
28884    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28885        let avail_len = __input.len();
28886        let mut payload_buf = [0; Self::ENCODED_LEN];
28887        let mut buf = if avail_len < Self::ENCODED_LEN {
28888            payload_buf[0..avail_len].copy_from_slice(__input);
28889            Bytes::new(&payload_buf)
28890        } else {
28891            Bytes::new(__input)
28892        };
28893        let mut __struct = Self::default();
28894        __struct.pointing_a = buf.get_i32_le()?;
28895        __struct.pointing_b = buf.get_i32_le()?;
28896        __struct.pointing_c = buf.get_i32_le()?;
28897        __struct.target_system = buf.get_u8()?;
28898        __struct.target_component = buf.get_u8()?;
28899        let tmp = buf.get_u8()?;
28900        __struct.mount_mode =
28901            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28902                enum_type: "MavMountMode",
28903                value: tmp as u64,
28904            })?;
28905        Ok(__struct)
28906    }
28907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28908        let mut __tmp = BytesMut::new(bytes);
28909        #[allow(clippy::absurd_extreme_comparisons)]
28910        #[allow(unused_comparisons)]
28911        if __tmp.remaining() < Self::ENCODED_LEN {
28912            panic!(
28913                "buffer is too small (need {} bytes, but got {})",
28914                Self::ENCODED_LEN,
28915                __tmp.remaining(),
28916            )
28917        }
28918        __tmp.put_i32_le(self.pointing_a);
28919        __tmp.put_i32_le(self.pointing_b);
28920        __tmp.put_i32_le(self.pointing_c);
28921        __tmp.put_u8(self.target_system);
28922        __tmp.put_u8(self.target_component);
28923        if matches!(version, MavlinkVersion::V2) {
28924            __tmp.put_u8(self.mount_mode as u8);
28925            let len = __tmp.len();
28926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28927        } else {
28928            __tmp.len()
28929        }
28930    }
28931}
28932#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
28933#[doc = ""]
28934#[doc = "ID: 251"]
28935#[derive(Debug, Clone, PartialEq)]
28936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28938#[cfg_attr(feature = "ts", derive(TS))]
28939#[cfg_attr(feature = "ts", ts(export))]
28940pub struct NAMED_VALUE_FLOAT_DATA {
28941    #[doc = "Timestamp (time since system boot)."]
28942    pub time_boot_ms: u32,
28943    #[doc = "Floating point value"]
28944    pub value: f32,
28945    #[doc = "Name of the debug variable"]
28946    #[cfg_attr(feature = "ts", ts(type = "string"))]
28947    pub name: CharArray<10>,
28948}
28949impl NAMED_VALUE_FLOAT_DATA {
28950    pub const ENCODED_LEN: usize = 18usize;
28951    pub const DEFAULT: Self = Self {
28952        time_boot_ms: 0_u32,
28953        value: 0.0_f32,
28954        name: CharArray::new([0_u8; 10usize]),
28955    };
28956    #[cfg(feature = "arbitrary")]
28957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28958        use arbitrary::{Arbitrary, Unstructured};
28959        let mut buf = [0u8; 1024];
28960        rng.fill_bytes(&mut buf);
28961        let mut unstructured = Unstructured::new(&buf);
28962        Self::arbitrary(&mut unstructured).unwrap_or_default()
28963    }
28964}
28965impl Default for NAMED_VALUE_FLOAT_DATA {
28966    fn default() -> Self {
28967        Self::DEFAULT.clone()
28968    }
28969}
28970impl MessageData for NAMED_VALUE_FLOAT_DATA {
28971    type Message = MavMessage;
28972    const ID: u32 = 251u32;
28973    const NAME: &'static str = "NAMED_VALUE_FLOAT";
28974    const EXTRA_CRC: u8 = 170u8;
28975    const ENCODED_LEN: usize = 18usize;
28976    fn deser(
28977        _version: MavlinkVersion,
28978        __input: &[u8],
28979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28980        let avail_len = __input.len();
28981        let mut payload_buf = [0; Self::ENCODED_LEN];
28982        let mut buf = if avail_len < Self::ENCODED_LEN {
28983            payload_buf[0..avail_len].copy_from_slice(__input);
28984            Bytes::new(&payload_buf)
28985        } else {
28986            Bytes::new(__input)
28987        };
28988        let mut __struct = Self::default();
28989        __struct.time_boot_ms = buf.get_u32_le()?;
28990        __struct.value = buf.get_f32_le()?;
28991        let mut tmp = [0_u8; 10usize];
28992        for v in &mut tmp {
28993            *v = buf.get_u8()?;
28994        }
28995        __struct.name = CharArray::new(tmp);
28996        Ok(__struct)
28997    }
28998    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28999        let mut __tmp = BytesMut::new(bytes);
29000        #[allow(clippy::absurd_extreme_comparisons)]
29001        #[allow(unused_comparisons)]
29002        if __tmp.remaining() < Self::ENCODED_LEN {
29003            panic!(
29004                "buffer is too small (need {} bytes, but got {})",
29005                Self::ENCODED_LEN,
29006                __tmp.remaining(),
29007            )
29008        }
29009        __tmp.put_u32_le(self.time_boot_ms);
29010        __tmp.put_f32_le(self.value);
29011        for val in &self.name {
29012            __tmp.put_u8(*val);
29013        }
29014        if matches!(version, MavlinkVersion::V2) {
29015            let len = __tmp.len();
29016            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29017        } else {
29018            __tmp.len()
29019        }
29020    }
29021}
29022#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
29023#[doc = ""]
29024#[doc = "ID: 252"]
29025#[derive(Debug, Clone, PartialEq)]
29026#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29027#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29028#[cfg_attr(feature = "ts", derive(TS))]
29029#[cfg_attr(feature = "ts", ts(export))]
29030pub struct NAMED_VALUE_INT_DATA {
29031    #[doc = "Timestamp (time since system boot)."]
29032    pub time_boot_ms: u32,
29033    #[doc = "Signed integer value"]
29034    pub value: i32,
29035    #[doc = "Name of the debug variable"]
29036    #[cfg_attr(feature = "ts", ts(type = "string"))]
29037    pub name: CharArray<10>,
29038}
29039impl NAMED_VALUE_INT_DATA {
29040    pub const ENCODED_LEN: usize = 18usize;
29041    pub const DEFAULT: Self = Self {
29042        time_boot_ms: 0_u32,
29043        value: 0_i32,
29044        name: CharArray::new([0_u8; 10usize]),
29045    };
29046    #[cfg(feature = "arbitrary")]
29047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29048        use arbitrary::{Arbitrary, Unstructured};
29049        let mut buf = [0u8; 1024];
29050        rng.fill_bytes(&mut buf);
29051        let mut unstructured = Unstructured::new(&buf);
29052        Self::arbitrary(&mut unstructured).unwrap_or_default()
29053    }
29054}
29055impl Default for NAMED_VALUE_INT_DATA {
29056    fn default() -> Self {
29057        Self::DEFAULT.clone()
29058    }
29059}
29060impl MessageData for NAMED_VALUE_INT_DATA {
29061    type Message = MavMessage;
29062    const ID: u32 = 252u32;
29063    const NAME: &'static str = "NAMED_VALUE_INT";
29064    const EXTRA_CRC: u8 = 44u8;
29065    const ENCODED_LEN: usize = 18usize;
29066    fn deser(
29067        _version: MavlinkVersion,
29068        __input: &[u8],
29069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29070        let avail_len = __input.len();
29071        let mut payload_buf = [0; Self::ENCODED_LEN];
29072        let mut buf = if avail_len < Self::ENCODED_LEN {
29073            payload_buf[0..avail_len].copy_from_slice(__input);
29074            Bytes::new(&payload_buf)
29075        } else {
29076            Bytes::new(__input)
29077        };
29078        let mut __struct = Self::default();
29079        __struct.time_boot_ms = buf.get_u32_le()?;
29080        __struct.value = buf.get_i32_le()?;
29081        let mut tmp = [0_u8; 10usize];
29082        for v in &mut tmp {
29083            *v = buf.get_u8()?;
29084        }
29085        __struct.name = CharArray::new(tmp);
29086        Ok(__struct)
29087    }
29088    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29089        let mut __tmp = BytesMut::new(bytes);
29090        #[allow(clippy::absurd_extreme_comparisons)]
29091        #[allow(unused_comparisons)]
29092        if __tmp.remaining() < Self::ENCODED_LEN {
29093            panic!(
29094                "buffer is too small (need {} bytes, but got {})",
29095                Self::ENCODED_LEN,
29096                __tmp.remaining(),
29097            )
29098        }
29099        __tmp.put_u32_le(self.time_boot_ms);
29100        __tmp.put_i32_le(self.value);
29101        for val in &self.name {
29102            __tmp.put_u8(*val);
29103        }
29104        if matches!(version, MavlinkVersion::V2) {
29105            let len = __tmp.len();
29106            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29107        } else {
29108            __tmp.len()
29109        }
29110    }
29111}
29112#[doc = "The state of the navigation and position controller."]
29113#[doc = ""]
29114#[doc = "ID: 62"]
29115#[derive(Debug, Clone, PartialEq)]
29116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29118#[cfg_attr(feature = "ts", derive(TS))]
29119#[cfg_attr(feature = "ts", ts(export))]
29120pub struct NAV_CONTROLLER_OUTPUT_DATA {
29121    #[doc = "Current desired roll"]
29122    pub nav_roll: f32,
29123    #[doc = "Current desired pitch"]
29124    pub nav_pitch: f32,
29125    #[doc = "Current altitude error"]
29126    pub alt_error: f32,
29127    #[doc = "Current airspeed error"]
29128    pub aspd_error: f32,
29129    #[doc = "Current crosstrack error on x-y plane"]
29130    pub xtrack_error: f32,
29131    #[doc = "Current desired heading"]
29132    pub nav_bearing: i16,
29133    #[doc = "Bearing to current waypoint/target"]
29134    pub target_bearing: i16,
29135    #[doc = "Distance to active waypoint"]
29136    pub wp_dist: u16,
29137}
29138impl NAV_CONTROLLER_OUTPUT_DATA {
29139    pub const ENCODED_LEN: usize = 26usize;
29140    pub const DEFAULT: Self = Self {
29141        nav_roll: 0.0_f32,
29142        nav_pitch: 0.0_f32,
29143        alt_error: 0.0_f32,
29144        aspd_error: 0.0_f32,
29145        xtrack_error: 0.0_f32,
29146        nav_bearing: 0_i16,
29147        target_bearing: 0_i16,
29148        wp_dist: 0_u16,
29149    };
29150    #[cfg(feature = "arbitrary")]
29151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29152        use arbitrary::{Arbitrary, Unstructured};
29153        let mut buf = [0u8; 1024];
29154        rng.fill_bytes(&mut buf);
29155        let mut unstructured = Unstructured::new(&buf);
29156        Self::arbitrary(&mut unstructured).unwrap_or_default()
29157    }
29158}
29159impl Default for NAV_CONTROLLER_OUTPUT_DATA {
29160    fn default() -> Self {
29161        Self::DEFAULT.clone()
29162    }
29163}
29164impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
29165    type Message = MavMessage;
29166    const ID: u32 = 62u32;
29167    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
29168    const EXTRA_CRC: u8 = 183u8;
29169    const ENCODED_LEN: usize = 26usize;
29170    fn deser(
29171        _version: MavlinkVersion,
29172        __input: &[u8],
29173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29174        let avail_len = __input.len();
29175        let mut payload_buf = [0; Self::ENCODED_LEN];
29176        let mut buf = if avail_len < Self::ENCODED_LEN {
29177            payload_buf[0..avail_len].copy_from_slice(__input);
29178            Bytes::new(&payload_buf)
29179        } else {
29180            Bytes::new(__input)
29181        };
29182        let mut __struct = Self::default();
29183        __struct.nav_roll = buf.get_f32_le()?;
29184        __struct.nav_pitch = buf.get_f32_le()?;
29185        __struct.alt_error = buf.get_f32_le()?;
29186        __struct.aspd_error = buf.get_f32_le()?;
29187        __struct.xtrack_error = buf.get_f32_le()?;
29188        __struct.nav_bearing = buf.get_i16_le()?;
29189        __struct.target_bearing = buf.get_i16_le()?;
29190        __struct.wp_dist = buf.get_u16_le()?;
29191        Ok(__struct)
29192    }
29193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29194        let mut __tmp = BytesMut::new(bytes);
29195        #[allow(clippy::absurd_extreme_comparisons)]
29196        #[allow(unused_comparisons)]
29197        if __tmp.remaining() < Self::ENCODED_LEN {
29198            panic!(
29199                "buffer is too small (need {} bytes, but got {})",
29200                Self::ENCODED_LEN,
29201                __tmp.remaining(),
29202            )
29203        }
29204        __tmp.put_f32_le(self.nav_roll);
29205        __tmp.put_f32_le(self.nav_pitch);
29206        __tmp.put_f32_le(self.alt_error);
29207        __tmp.put_f32_le(self.aspd_error);
29208        __tmp.put_f32_le(self.xtrack_error);
29209        __tmp.put_i16_le(self.nav_bearing);
29210        __tmp.put_i16_le(self.target_bearing);
29211        __tmp.put_u16_le(self.wp_dist);
29212        if matches!(version, MavlinkVersion::V2) {
29213            let len = __tmp.len();
29214            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29215        } else {
29216            __tmp.len()
29217        }
29218    }
29219}
29220#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
29221#[doc = ""]
29222#[doc = "ID: 330"]
29223#[derive(Debug, Clone, PartialEq)]
29224#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29225#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29226#[cfg_attr(feature = "ts", derive(TS))]
29227#[cfg_attr(feature = "ts", ts(export))]
29228pub struct OBSTACLE_DISTANCE_DATA {
29229    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29230    pub time_usec: u64,
29231    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
29232    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29233    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29234    pub distances: [u16; 72],
29235    #[doc = "Minimum distance the sensor can measure."]
29236    pub min_distance: u16,
29237    #[doc = "Maximum distance the sensor can measure."]
29238    pub max_distance: u16,
29239    #[doc = "Class id of the distance sensor type."]
29240    pub sensor_type: MavDistanceSensor,
29241    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
29242    pub increment: u8,
29243    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
29244    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29245    pub increment_f: f32,
29246    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
29247    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29248    pub angle_offset: f32,
29249    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
29250    #[cfg_attr(feature = "serde", serde(default))]
29251    pub frame: MavFrame,
29252}
29253impl OBSTACLE_DISTANCE_DATA {
29254    pub const ENCODED_LEN: usize = 167usize;
29255    pub const DEFAULT: Self = Self {
29256        time_usec: 0_u64,
29257        distances: [0_u16; 72usize],
29258        min_distance: 0_u16,
29259        max_distance: 0_u16,
29260        sensor_type: MavDistanceSensor::DEFAULT,
29261        increment: 0_u8,
29262        increment_f: 0.0_f32,
29263        angle_offset: 0.0_f32,
29264        frame: MavFrame::DEFAULT,
29265    };
29266    #[cfg(feature = "arbitrary")]
29267    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29268        use arbitrary::{Arbitrary, Unstructured};
29269        let mut buf = [0u8; 1024];
29270        rng.fill_bytes(&mut buf);
29271        let mut unstructured = Unstructured::new(&buf);
29272        Self::arbitrary(&mut unstructured).unwrap_or_default()
29273    }
29274}
29275impl Default for OBSTACLE_DISTANCE_DATA {
29276    fn default() -> Self {
29277        Self::DEFAULT.clone()
29278    }
29279}
29280impl MessageData for OBSTACLE_DISTANCE_DATA {
29281    type Message = MavMessage;
29282    const ID: u32 = 330u32;
29283    const NAME: &'static str = "OBSTACLE_DISTANCE";
29284    const EXTRA_CRC: u8 = 23u8;
29285    const ENCODED_LEN: usize = 167usize;
29286    fn deser(
29287        _version: MavlinkVersion,
29288        __input: &[u8],
29289    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29290        let avail_len = __input.len();
29291        let mut payload_buf = [0; Self::ENCODED_LEN];
29292        let mut buf = if avail_len < Self::ENCODED_LEN {
29293            payload_buf[0..avail_len].copy_from_slice(__input);
29294            Bytes::new(&payload_buf)
29295        } else {
29296            Bytes::new(__input)
29297        };
29298        let mut __struct = Self::default();
29299        __struct.time_usec = buf.get_u64_le()?;
29300        for v in &mut __struct.distances {
29301            let val = buf.get_u16_le()?;
29302            *v = val;
29303        }
29304        __struct.min_distance = buf.get_u16_le()?;
29305        __struct.max_distance = buf.get_u16_le()?;
29306        let tmp = buf.get_u8()?;
29307        __struct.sensor_type =
29308            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29309                enum_type: "MavDistanceSensor",
29310                value: tmp as u64,
29311            })?;
29312        __struct.increment = buf.get_u8()?;
29313        __struct.increment_f = buf.get_f32_le()?;
29314        __struct.angle_offset = buf.get_f32_le()?;
29315        let tmp = buf.get_u8()?;
29316        __struct.frame =
29317            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29318                enum_type: "MavFrame",
29319                value: tmp as u64,
29320            })?;
29321        Ok(__struct)
29322    }
29323    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29324        let mut __tmp = BytesMut::new(bytes);
29325        #[allow(clippy::absurd_extreme_comparisons)]
29326        #[allow(unused_comparisons)]
29327        if __tmp.remaining() < Self::ENCODED_LEN {
29328            panic!(
29329                "buffer is too small (need {} bytes, but got {})",
29330                Self::ENCODED_LEN,
29331                __tmp.remaining(),
29332            )
29333        }
29334        __tmp.put_u64_le(self.time_usec);
29335        for val in &self.distances {
29336            __tmp.put_u16_le(*val);
29337        }
29338        __tmp.put_u16_le(self.min_distance);
29339        __tmp.put_u16_le(self.max_distance);
29340        __tmp.put_u8(self.sensor_type as u8);
29341        __tmp.put_u8(self.increment);
29342        if matches!(version, MavlinkVersion::V2) {
29343            __tmp.put_f32_le(self.increment_f);
29344            __tmp.put_f32_le(self.angle_offset);
29345            __tmp.put_u8(self.frame as u8);
29346            let len = __tmp.len();
29347            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29348        } else {
29349            __tmp.len()
29350        }
29351    }
29352}
29353#[doc = "Obstacle located as a 3D vector."]
29354#[doc = ""]
29355#[doc = "ID: 11037"]
29356#[derive(Debug, Clone, PartialEq)]
29357#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29358#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29359#[cfg_attr(feature = "ts", derive(TS))]
29360#[cfg_attr(feature = "ts", ts(export))]
29361pub struct OBSTACLE_DISTANCE_3D_DATA {
29362    #[doc = "Timestamp (time since system boot)."]
29363    pub time_boot_ms: u32,
29364    #[doc = "X position of the obstacle."]
29365    pub x: f32,
29366    #[doc = "Y position of the obstacle."]
29367    pub y: f32,
29368    #[doc = "Z position of the obstacle."]
29369    pub z: f32,
29370    #[doc = "Minimum distance the sensor can measure."]
29371    pub min_distance: f32,
29372    #[doc = "Maximum distance the sensor can measure."]
29373    pub max_distance: f32,
29374    #[doc = "Unique ID given to each obstacle so that its movement can be tracked. Use UINT16_MAX if object ID is unknown or cannot be determined."]
29375    pub obstacle_id: u16,
29376    #[doc = "Class id of the distance sensor type."]
29377    pub sensor_type: MavDistanceSensor,
29378    #[doc = "Coordinate frame of reference."]
29379    pub frame: MavFrame,
29380}
29381impl OBSTACLE_DISTANCE_3D_DATA {
29382    pub const ENCODED_LEN: usize = 28usize;
29383    pub const DEFAULT: Self = Self {
29384        time_boot_ms: 0_u32,
29385        x: 0.0_f32,
29386        y: 0.0_f32,
29387        z: 0.0_f32,
29388        min_distance: 0.0_f32,
29389        max_distance: 0.0_f32,
29390        obstacle_id: 0_u16,
29391        sensor_type: MavDistanceSensor::DEFAULT,
29392        frame: MavFrame::DEFAULT,
29393    };
29394    #[cfg(feature = "arbitrary")]
29395    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29396        use arbitrary::{Arbitrary, Unstructured};
29397        let mut buf = [0u8; 1024];
29398        rng.fill_bytes(&mut buf);
29399        let mut unstructured = Unstructured::new(&buf);
29400        Self::arbitrary(&mut unstructured).unwrap_or_default()
29401    }
29402}
29403impl Default for OBSTACLE_DISTANCE_3D_DATA {
29404    fn default() -> Self {
29405        Self::DEFAULT.clone()
29406    }
29407}
29408impl MessageData for OBSTACLE_DISTANCE_3D_DATA {
29409    type Message = MavMessage;
29410    const ID: u32 = 11037u32;
29411    const NAME: &'static str = "OBSTACLE_DISTANCE_3D";
29412    const EXTRA_CRC: u8 = 130u8;
29413    const ENCODED_LEN: usize = 28usize;
29414    fn deser(
29415        _version: MavlinkVersion,
29416        __input: &[u8],
29417    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29418        let avail_len = __input.len();
29419        let mut payload_buf = [0; Self::ENCODED_LEN];
29420        let mut buf = if avail_len < Self::ENCODED_LEN {
29421            payload_buf[0..avail_len].copy_from_slice(__input);
29422            Bytes::new(&payload_buf)
29423        } else {
29424            Bytes::new(__input)
29425        };
29426        let mut __struct = Self::default();
29427        __struct.time_boot_ms = buf.get_u32_le()?;
29428        __struct.x = buf.get_f32_le()?;
29429        __struct.y = buf.get_f32_le()?;
29430        __struct.z = buf.get_f32_le()?;
29431        __struct.min_distance = buf.get_f32_le()?;
29432        __struct.max_distance = buf.get_f32_le()?;
29433        __struct.obstacle_id = buf.get_u16_le()?;
29434        let tmp = buf.get_u8()?;
29435        __struct.sensor_type =
29436            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29437                enum_type: "MavDistanceSensor",
29438                value: tmp as u64,
29439            })?;
29440        let tmp = buf.get_u8()?;
29441        __struct.frame =
29442            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29443                enum_type: "MavFrame",
29444                value: tmp as u64,
29445            })?;
29446        Ok(__struct)
29447    }
29448    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29449        let mut __tmp = BytesMut::new(bytes);
29450        #[allow(clippy::absurd_extreme_comparisons)]
29451        #[allow(unused_comparisons)]
29452        if __tmp.remaining() < Self::ENCODED_LEN {
29453            panic!(
29454                "buffer is too small (need {} bytes, but got {})",
29455                Self::ENCODED_LEN,
29456                __tmp.remaining(),
29457            )
29458        }
29459        __tmp.put_u32_le(self.time_boot_ms);
29460        __tmp.put_f32_le(self.x);
29461        __tmp.put_f32_le(self.y);
29462        __tmp.put_f32_le(self.z);
29463        __tmp.put_f32_le(self.min_distance);
29464        __tmp.put_f32_le(self.max_distance);
29465        __tmp.put_u16_le(self.obstacle_id);
29466        __tmp.put_u8(self.sensor_type as u8);
29467        __tmp.put_u8(self.frame as u8);
29468        if matches!(version, MavlinkVersion::V2) {
29469            let len = __tmp.len();
29470            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29471        } else {
29472            __tmp.len()
29473        }
29474    }
29475}
29476#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
29477#[doc = ""]
29478#[doc = "ID: 331"]
29479#[derive(Debug, Clone, PartialEq)]
29480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29482#[cfg_attr(feature = "ts", derive(TS))]
29483#[cfg_attr(feature = "ts", ts(export))]
29484pub struct ODOMETRY_DATA {
29485    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29486    pub time_usec: u64,
29487    #[doc = "X Position"]
29488    pub x: f32,
29489    #[doc = "Y Position"]
29490    pub y: f32,
29491    #[doc = "Z Position"]
29492    pub z: f32,
29493    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
29494    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29495    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29496    pub q: [f32; 4],
29497    #[doc = "X linear speed"]
29498    pub vx: f32,
29499    #[doc = "Y linear speed"]
29500    pub vy: f32,
29501    #[doc = "Z linear speed"]
29502    pub vz: f32,
29503    #[doc = "Roll angular speed"]
29504    pub rollspeed: f32,
29505    #[doc = "Pitch angular speed"]
29506    pub pitchspeed: f32,
29507    #[doc = "Yaw angular speed"]
29508    pub yawspeed: f32,
29509    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
29510    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29511    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29512    pub pose_covariance: [f32; 21],
29513    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
29514    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29515    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29516    pub velocity_covariance: [f32; 21],
29517    #[doc = "Coordinate frame of reference for the pose data."]
29518    pub frame_id: MavFrame,
29519    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
29520    pub child_frame_id: MavFrame,
29521    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
29522    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29523    pub reset_counter: u8,
29524    #[doc = "Type of estimator that is providing the odometry."]
29525    #[cfg_attr(feature = "serde", serde(default))]
29526    pub estimator_type: MavEstimatorType,
29527    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
29528    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29529    pub quality: i8,
29530}
29531impl ODOMETRY_DATA {
29532    pub const ENCODED_LEN: usize = 233usize;
29533    pub const DEFAULT: Self = Self {
29534        time_usec: 0_u64,
29535        x: 0.0_f32,
29536        y: 0.0_f32,
29537        z: 0.0_f32,
29538        q: [0.0_f32; 4usize],
29539        vx: 0.0_f32,
29540        vy: 0.0_f32,
29541        vz: 0.0_f32,
29542        rollspeed: 0.0_f32,
29543        pitchspeed: 0.0_f32,
29544        yawspeed: 0.0_f32,
29545        pose_covariance: [0.0_f32; 21usize],
29546        velocity_covariance: [0.0_f32; 21usize],
29547        frame_id: MavFrame::DEFAULT,
29548        child_frame_id: MavFrame::DEFAULT,
29549        reset_counter: 0_u8,
29550        estimator_type: MavEstimatorType::DEFAULT,
29551        quality: 0_i8,
29552    };
29553    #[cfg(feature = "arbitrary")]
29554    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29555        use arbitrary::{Arbitrary, Unstructured};
29556        let mut buf = [0u8; 1024];
29557        rng.fill_bytes(&mut buf);
29558        let mut unstructured = Unstructured::new(&buf);
29559        Self::arbitrary(&mut unstructured).unwrap_or_default()
29560    }
29561}
29562impl Default for ODOMETRY_DATA {
29563    fn default() -> Self {
29564        Self::DEFAULT.clone()
29565    }
29566}
29567impl MessageData for ODOMETRY_DATA {
29568    type Message = MavMessage;
29569    const ID: u32 = 331u32;
29570    const NAME: &'static str = "ODOMETRY";
29571    const EXTRA_CRC: u8 = 91u8;
29572    const ENCODED_LEN: usize = 233usize;
29573    fn deser(
29574        _version: MavlinkVersion,
29575        __input: &[u8],
29576    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29577        let avail_len = __input.len();
29578        let mut payload_buf = [0; Self::ENCODED_LEN];
29579        let mut buf = if avail_len < Self::ENCODED_LEN {
29580            payload_buf[0..avail_len].copy_from_slice(__input);
29581            Bytes::new(&payload_buf)
29582        } else {
29583            Bytes::new(__input)
29584        };
29585        let mut __struct = Self::default();
29586        __struct.time_usec = buf.get_u64_le()?;
29587        __struct.x = buf.get_f32_le()?;
29588        __struct.y = buf.get_f32_le()?;
29589        __struct.z = buf.get_f32_le()?;
29590        for v in &mut __struct.q {
29591            let val = buf.get_f32_le()?;
29592            *v = val;
29593        }
29594        __struct.vx = buf.get_f32_le()?;
29595        __struct.vy = buf.get_f32_le()?;
29596        __struct.vz = buf.get_f32_le()?;
29597        __struct.rollspeed = buf.get_f32_le()?;
29598        __struct.pitchspeed = buf.get_f32_le()?;
29599        __struct.yawspeed = buf.get_f32_le()?;
29600        for v in &mut __struct.pose_covariance {
29601            let val = buf.get_f32_le()?;
29602            *v = val;
29603        }
29604        for v in &mut __struct.velocity_covariance {
29605            let val = buf.get_f32_le()?;
29606            *v = val;
29607        }
29608        let tmp = buf.get_u8()?;
29609        __struct.frame_id =
29610            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29611                enum_type: "MavFrame",
29612                value: tmp as u64,
29613            })?;
29614        let tmp = buf.get_u8()?;
29615        __struct.child_frame_id =
29616            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29617                enum_type: "MavFrame",
29618                value: tmp as u64,
29619            })?;
29620        __struct.reset_counter = buf.get_u8()?;
29621        let tmp = buf.get_u8()?;
29622        __struct.estimator_type =
29623            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29624                enum_type: "MavEstimatorType",
29625                value: tmp as u64,
29626            })?;
29627        __struct.quality = buf.get_i8()?;
29628        Ok(__struct)
29629    }
29630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29631        let mut __tmp = BytesMut::new(bytes);
29632        #[allow(clippy::absurd_extreme_comparisons)]
29633        #[allow(unused_comparisons)]
29634        if __tmp.remaining() < Self::ENCODED_LEN {
29635            panic!(
29636                "buffer is too small (need {} bytes, but got {})",
29637                Self::ENCODED_LEN,
29638                __tmp.remaining(),
29639            )
29640        }
29641        __tmp.put_u64_le(self.time_usec);
29642        __tmp.put_f32_le(self.x);
29643        __tmp.put_f32_le(self.y);
29644        __tmp.put_f32_le(self.z);
29645        for val in &self.q {
29646            __tmp.put_f32_le(*val);
29647        }
29648        __tmp.put_f32_le(self.vx);
29649        __tmp.put_f32_le(self.vy);
29650        __tmp.put_f32_le(self.vz);
29651        __tmp.put_f32_le(self.rollspeed);
29652        __tmp.put_f32_le(self.pitchspeed);
29653        __tmp.put_f32_le(self.yawspeed);
29654        for val in &self.pose_covariance {
29655            __tmp.put_f32_le(*val);
29656        }
29657        for val in &self.velocity_covariance {
29658            __tmp.put_f32_le(*val);
29659        }
29660        __tmp.put_u8(self.frame_id as u8);
29661        __tmp.put_u8(self.child_frame_id as u8);
29662        if matches!(version, MavlinkVersion::V2) {
29663            __tmp.put_u8(self.reset_counter);
29664            __tmp.put_u8(self.estimator_type as u8);
29665            __tmp.put_i8(self.quality);
29666            let len = __tmp.len();
29667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29668        } else {
29669            __tmp.len()
29670        }
29671    }
29672}
29673#[doc = "Hardware status sent by an onboard computer."]
29674#[doc = ""]
29675#[doc = "ID: 390"]
29676#[derive(Debug, Clone, PartialEq)]
29677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29679#[cfg_attr(feature = "ts", derive(TS))]
29680#[cfg_attr(feature = "ts", ts(export))]
29681pub struct ONBOARD_COMPUTER_STATUS_DATA {
29682    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29683    pub time_usec: u64,
29684    #[doc = "Time since system boot."]
29685    pub uptime: u32,
29686    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
29687    pub ram_usage: u32,
29688    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
29689    pub ram_total: u32,
29690    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
29691    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29692    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29693    pub storage_type: [u32; 4],
29694    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
29695    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29696    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29697    pub storage_usage: [u32; 4],
29698    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
29699    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29700    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29701    pub storage_total: [u32; 4],
29702    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
29703    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29704    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29705    pub link_type: [u32; 6],
29706    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
29707    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29708    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29709    pub link_tx_rate: [u32; 6],
29710    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
29711    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29712    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29713    pub link_rx_rate: [u32; 6],
29714    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
29715    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29716    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29717    pub link_tx_max: [u32; 6],
29718    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
29719    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29720    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29721    pub link_rx_max: [u32; 6],
29722    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
29723    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29724    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29725    pub fan_speed: [i16; 4],
29726    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
29727    pub mavtype: u8,
29728    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
29729    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29730    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29731    pub cpu_cores: [u8; 8],
29732    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
29733    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29734    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29735    pub cpu_combined: [u8; 10],
29736    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
29737    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29738    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29739    pub gpu_cores: [u8; 4],
29740    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
29741    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29742    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29743    pub gpu_combined: [u8; 10],
29744    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
29745    pub temperature_board: i8,
29746    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
29747    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29748    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29749    pub temperature_core: [i8; 8],
29750}
29751impl ONBOARD_COMPUTER_STATUS_DATA {
29752    pub const ENCODED_LEN: usize = 238usize;
29753    pub const DEFAULT: Self = Self {
29754        time_usec: 0_u64,
29755        uptime: 0_u32,
29756        ram_usage: 0_u32,
29757        ram_total: 0_u32,
29758        storage_type: [0_u32; 4usize],
29759        storage_usage: [0_u32; 4usize],
29760        storage_total: [0_u32; 4usize],
29761        link_type: [0_u32; 6usize],
29762        link_tx_rate: [0_u32; 6usize],
29763        link_rx_rate: [0_u32; 6usize],
29764        link_tx_max: [0_u32; 6usize],
29765        link_rx_max: [0_u32; 6usize],
29766        fan_speed: [0_i16; 4usize],
29767        mavtype: 0_u8,
29768        cpu_cores: [0_u8; 8usize],
29769        cpu_combined: [0_u8; 10usize],
29770        gpu_cores: [0_u8; 4usize],
29771        gpu_combined: [0_u8; 10usize],
29772        temperature_board: 0_i8,
29773        temperature_core: [0_i8; 8usize],
29774    };
29775    #[cfg(feature = "arbitrary")]
29776    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29777        use arbitrary::{Arbitrary, Unstructured};
29778        let mut buf = [0u8; 1024];
29779        rng.fill_bytes(&mut buf);
29780        let mut unstructured = Unstructured::new(&buf);
29781        Self::arbitrary(&mut unstructured).unwrap_or_default()
29782    }
29783}
29784impl Default for ONBOARD_COMPUTER_STATUS_DATA {
29785    fn default() -> Self {
29786        Self::DEFAULT.clone()
29787    }
29788}
29789impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
29790    type Message = MavMessage;
29791    const ID: u32 = 390u32;
29792    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
29793    const EXTRA_CRC: u8 = 156u8;
29794    const ENCODED_LEN: usize = 238usize;
29795    fn deser(
29796        _version: MavlinkVersion,
29797        __input: &[u8],
29798    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29799        let avail_len = __input.len();
29800        let mut payload_buf = [0; Self::ENCODED_LEN];
29801        let mut buf = if avail_len < Self::ENCODED_LEN {
29802            payload_buf[0..avail_len].copy_from_slice(__input);
29803            Bytes::new(&payload_buf)
29804        } else {
29805            Bytes::new(__input)
29806        };
29807        let mut __struct = Self::default();
29808        __struct.time_usec = buf.get_u64_le()?;
29809        __struct.uptime = buf.get_u32_le()?;
29810        __struct.ram_usage = buf.get_u32_le()?;
29811        __struct.ram_total = buf.get_u32_le()?;
29812        for v in &mut __struct.storage_type {
29813            let val = buf.get_u32_le()?;
29814            *v = val;
29815        }
29816        for v in &mut __struct.storage_usage {
29817            let val = buf.get_u32_le()?;
29818            *v = val;
29819        }
29820        for v in &mut __struct.storage_total {
29821            let val = buf.get_u32_le()?;
29822            *v = val;
29823        }
29824        for v in &mut __struct.link_type {
29825            let val = buf.get_u32_le()?;
29826            *v = val;
29827        }
29828        for v in &mut __struct.link_tx_rate {
29829            let val = buf.get_u32_le()?;
29830            *v = val;
29831        }
29832        for v in &mut __struct.link_rx_rate {
29833            let val = buf.get_u32_le()?;
29834            *v = val;
29835        }
29836        for v in &mut __struct.link_tx_max {
29837            let val = buf.get_u32_le()?;
29838            *v = val;
29839        }
29840        for v in &mut __struct.link_rx_max {
29841            let val = buf.get_u32_le()?;
29842            *v = val;
29843        }
29844        for v in &mut __struct.fan_speed {
29845            let val = buf.get_i16_le()?;
29846            *v = val;
29847        }
29848        __struct.mavtype = buf.get_u8()?;
29849        for v in &mut __struct.cpu_cores {
29850            let val = buf.get_u8()?;
29851            *v = val;
29852        }
29853        for v in &mut __struct.cpu_combined {
29854            let val = buf.get_u8()?;
29855            *v = val;
29856        }
29857        for v in &mut __struct.gpu_cores {
29858            let val = buf.get_u8()?;
29859            *v = val;
29860        }
29861        for v in &mut __struct.gpu_combined {
29862            let val = buf.get_u8()?;
29863            *v = val;
29864        }
29865        __struct.temperature_board = buf.get_i8()?;
29866        for v in &mut __struct.temperature_core {
29867            let val = buf.get_i8()?;
29868            *v = val;
29869        }
29870        Ok(__struct)
29871    }
29872    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29873        let mut __tmp = BytesMut::new(bytes);
29874        #[allow(clippy::absurd_extreme_comparisons)]
29875        #[allow(unused_comparisons)]
29876        if __tmp.remaining() < Self::ENCODED_LEN {
29877            panic!(
29878                "buffer is too small (need {} bytes, but got {})",
29879                Self::ENCODED_LEN,
29880                __tmp.remaining(),
29881            )
29882        }
29883        __tmp.put_u64_le(self.time_usec);
29884        __tmp.put_u32_le(self.uptime);
29885        __tmp.put_u32_le(self.ram_usage);
29886        __tmp.put_u32_le(self.ram_total);
29887        for val in &self.storage_type {
29888            __tmp.put_u32_le(*val);
29889        }
29890        for val in &self.storage_usage {
29891            __tmp.put_u32_le(*val);
29892        }
29893        for val in &self.storage_total {
29894            __tmp.put_u32_le(*val);
29895        }
29896        for val in &self.link_type {
29897            __tmp.put_u32_le(*val);
29898        }
29899        for val in &self.link_tx_rate {
29900            __tmp.put_u32_le(*val);
29901        }
29902        for val in &self.link_rx_rate {
29903            __tmp.put_u32_le(*val);
29904        }
29905        for val in &self.link_tx_max {
29906            __tmp.put_u32_le(*val);
29907        }
29908        for val in &self.link_rx_max {
29909            __tmp.put_u32_le(*val);
29910        }
29911        for val in &self.fan_speed {
29912            __tmp.put_i16_le(*val);
29913        }
29914        __tmp.put_u8(self.mavtype);
29915        for val in &self.cpu_cores {
29916            __tmp.put_u8(*val);
29917        }
29918        for val in &self.cpu_combined {
29919            __tmp.put_u8(*val);
29920        }
29921        for val in &self.gpu_cores {
29922            __tmp.put_u8(*val);
29923        }
29924        for val in &self.gpu_combined {
29925            __tmp.put_u8(*val);
29926        }
29927        __tmp.put_i8(self.temperature_board);
29928        for val in &self.temperature_core {
29929            __tmp.put_i8(*val);
29930        }
29931        if matches!(version, MavlinkVersion::V2) {
29932            let len = __tmp.len();
29933            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29934        } else {
29935            __tmp.len()
29936        }
29937    }
29938}
29939#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
29940#[doc = ""]
29941#[doc = "ID: 12918"]
29942#[derive(Debug, Clone, PartialEq)]
29943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29945#[cfg_attr(feature = "ts", derive(TS))]
29946#[cfg_attr(feature = "ts", ts(export))]
29947pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
29948    #[doc = "Status level indicating if arming is allowed."]
29949    pub status: MavOdidArmStatus,
29950    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
29951    #[cfg_attr(feature = "ts", ts(type = "string"))]
29952    pub error: CharArray<50>,
29953}
29954impl OPEN_DRONE_ID_ARM_STATUS_DATA {
29955    pub const ENCODED_LEN: usize = 51usize;
29956    pub const DEFAULT: Self = Self {
29957        status: MavOdidArmStatus::DEFAULT,
29958        error: CharArray::new([0_u8; 50usize]),
29959    };
29960    #[cfg(feature = "arbitrary")]
29961    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29962        use arbitrary::{Arbitrary, Unstructured};
29963        let mut buf = [0u8; 1024];
29964        rng.fill_bytes(&mut buf);
29965        let mut unstructured = Unstructured::new(&buf);
29966        Self::arbitrary(&mut unstructured).unwrap_or_default()
29967    }
29968}
29969impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
29970    fn default() -> Self {
29971        Self::DEFAULT.clone()
29972    }
29973}
29974impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
29975    type Message = MavMessage;
29976    const ID: u32 = 12918u32;
29977    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
29978    const EXTRA_CRC: u8 = 139u8;
29979    const ENCODED_LEN: usize = 51usize;
29980    fn deser(
29981        _version: MavlinkVersion,
29982        __input: &[u8],
29983    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29984        let avail_len = __input.len();
29985        let mut payload_buf = [0; Self::ENCODED_LEN];
29986        let mut buf = if avail_len < Self::ENCODED_LEN {
29987            payload_buf[0..avail_len].copy_from_slice(__input);
29988            Bytes::new(&payload_buf)
29989        } else {
29990            Bytes::new(__input)
29991        };
29992        let mut __struct = Self::default();
29993        let tmp = buf.get_u8()?;
29994        __struct.status =
29995            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29996                enum_type: "MavOdidArmStatus",
29997                value: tmp as u64,
29998            })?;
29999        let mut tmp = [0_u8; 50usize];
30000        for v in &mut tmp {
30001            *v = buf.get_u8()?;
30002        }
30003        __struct.error = CharArray::new(tmp);
30004        Ok(__struct)
30005    }
30006    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30007        let mut __tmp = BytesMut::new(bytes);
30008        #[allow(clippy::absurd_extreme_comparisons)]
30009        #[allow(unused_comparisons)]
30010        if __tmp.remaining() < Self::ENCODED_LEN {
30011            panic!(
30012                "buffer is too small (need {} bytes, but got {})",
30013                Self::ENCODED_LEN,
30014                __tmp.remaining(),
30015            )
30016        }
30017        __tmp.put_u8(self.status as u8);
30018        for val in &self.error {
30019            __tmp.put_u8(*val);
30020        }
30021        if matches!(version, MavlinkVersion::V2) {
30022            let len = __tmp.len();
30023            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30024        } else {
30025            __tmp.len()
30026        }
30027    }
30028}
30029#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
30030#[doc = ""]
30031#[doc = "ID: 12902"]
30032#[derive(Debug, Clone, PartialEq)]
30033#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30035#[cfg_attr(feature = "ts", derive(TS))]
30036#[cfg_attr(feature = "ts", ts(export))]
30037pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
30038    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
30039    pub timestamp: u32,
30040    #[doc = "System ID (0 for broadcast)."]
30041    pub target_system: u8,
30042    #[doc = "Component ID (0 for broadcast)."]
30043    pub target_component: u8,
30044    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
30045    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30046    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30047    pub id_or_mac: [u8; 20],
30048    #[doc = "Indicates the type of authentication."]
30049    pub authentication_type: MavOdidAuthType,
30050    #[doc = "Allowed range is 0 - 15."]
30051    pub data_page: u8,
30052    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
30053    pub last_page_index: u8,
30054    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
30055    pub length: u8,
30056    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
30057    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30058    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30059    pub authentication_data: [u8; 23],
30060}
30061impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
30062    pub const ENCODED_LEN: usize = 53usize;
30063    pub const DEFAULT: Self = Self {
30064        timestamp: 0_u32,
30065        target_system: 0_u8,
30066        target_component: 0_u8,
30067        id_or_mac: [0_u8; 20usize],
30068        authentication_type: MavOdidAuthType::DEFAULT,
30069        data_page: 0_u8,
30070        last_page_index: 0_u8,
30071        length: 0_u8,
30072        authentication_data: [0_u8; 23usize],
30073    };
30074    #[cfg(feature = "arbitrary")]
30075    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30076        use arbitrary::{Arbitrary, Unstructured};
30077        let mut buf = [0u8; 1024];
30078        rng.fill_bytes(&mut buf);
30079        let mut unstructured = Unstructured::new(&buf);
30080        Self::arbitrary(&mut unstructured).unwrap_or_default()
30081    }
30082}
30083impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
30084    fn default() -> Self {
30085        Self::DEFAULT.clone()
30086    }
30087}
30088impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
30089    type Message = MavMessage;
30090    const ID: u32 = 12902u32;
30091    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
30092    const EXTRA_CRC: u8 = 140u8;
30093    const ENCODED_LEN: usize = 53usize;
30094    fn deser(
30095        _version: MavlinkVersion,
30096        __input: &[u8],
30097    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30098        let avail_len = __input.len();
30099        let mut payload_buf = [0; Self::ENCODED_LEN];
30100        let mut buf = if avail_len < Self::ENCODED_LEN {
30101            payload_buf[0..avail_len].copy_from_slice(__input);
30102            Bytes::new(&payload_buf)
30103        } else {
30104            Bytes::new(__input)
30105        };
30106        let mut __struct = Self::default();
30107        __struct.timestamp = buf.get_u32_le()?;
30108        __struct.target_system = buf.get_u8()?;
30109        __struct.target_component = buf.get_u8()?;
30110        for v in &mut __struct.id_or_mac {
30111            let val = buf.get_u8()?;
30112            *v = val;
30113        }
30114        let tmp = buf.get_u8()?;
30115        __struct.authentication_type =
30116            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30117                enum_type: "MavOdidAuthType",
30118                value: tmp as u64,
30119            })?;
30120        __struct.data_page = buf.get_u8()?;
30121        __struct.last_page_index = buf.get_u8()?;
30122        __struct.length = buf.get_u8()?;
30123        for v in &mut __struct.authentication_data {
30124            let val = buf.get_u8()?;
30125            *v = val;
30126        }
30127        Ok(__struct)
30128    }
30129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30130        let mut __tmp = BytesMut::new(bytes);
30131        #[allow(clippy::absurd_extreme_comparisons)]
30132        #[allow(unused_comparisons)]
30133        if __tmp.remaining() < Self::ENCODED_LEN {
30134            panic!(
30135                "buffer is too small (need {} bytes, but got {})",
30136                Self::ENCODED_LEN,
30137                __tmp.remaining(),
30138            )
30139        }
30140        __tmp.put_u32_le(self.timestamp);
30141        __tmp.put_u8(self.target_system);
30142        __tmp.put_u8(self.target_component);
30143        for val in &self.id_or_mac {
30144            __tmp.put_u8(*val);
30145        }
30146        __tmp.put_u8(self.authentication_type as u8);
30147        __tmp.put_u8(self.data_page);
30148        __tmp.put_u8(self.last_page_index);
30149        __tmp.put_u8(self.length);
30150        for val in &self.authentication_data {
30151            __tmp.put_u8(*val);
30152        }
30153        if matches!(version, MavlinkVersion::V2) {
30154            let len = __tmp.len();
30155            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30156        } else {
30157            __tmp.len()
30158        }
30159    }
30160}
30161#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
30162#[doc = ""]
30163#[doc = "ID: 12900"]
30164#[derive(Debug, Clone, PartialEq)]
30165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30167#[cfg_attr(feature = "ts", derive(TS))]
30168#[cfg_attr(feature = "ts", ts(export))]
30169pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
30170    #[doc = "System ID (0 for broadcast)."]
30171    pub target_system: u8,
30172    #[doc = "Component ID (0 for broadcast)."]
30173    pub target_component: u8,
30174    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
30175    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30176    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30177    pub id_or_mac: [u8; 20],
30178    #[doc = "Indicates the format for the uas_id field of this message."]
30179    pub id_type: MavOdidIdType,
30180    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
30181    pub ua_type: MavOdidUaType,
30182    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
30183    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30184    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30185    pub uas_id: [u8; 20],
30186}
30187impl OPEN_DRONE_ID_BASIC_ID_DATA {
30188    pub const ENCODED_LEN: usize = 44usize;
30189    pub const DEFAULT: Self = Self {
30190        target_system: 0_u8,
30191        target_component: 0_u8,
30192        id_or_mac: [0_u8; 20usize],
30193        id_type: MavOdidIdType::DEFAULT,
30194        ua_type: MavOdidUaType::DEFAULT,
30195        uas_id: [0_u8; 20usize],
30196    };
30197    #[cfg(feature = "arbitrary")]
30198    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30199        use arbitrary::{Arbitrary, Unstructured};
30200        let mut buf = [0u8; 1024];
30201        rng.fill_bytes(&mut buf);
30202        let mut unstructured = Unstructured::new(&buf);
30203        Self::arbitrary(&mut unstructured).unwrap_or_default()
30204    }
30205}
30206impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
30207    fn default() -> Self {
30208        Self::DEFAULT.clone()
30209    }
30210}
30211impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
30212    type Message = MavMessage;
30213    const ID: u32 = 12900u32;
30214    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
30215    const EXTRA_CRC: u8 = 114u8;
30216    const ENCODED_LEN: usize = 44usize;
30217    fn deser(
30218        _version: MavlinkVersion,
30219        __input: &[u8],
30220    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30221        let avail_len = __input.len();
30222        let mut payload_buf = [0; Self::ENCODED_LEN];
30223        let mut buf = if avail_len < Self::ENCODED_LEN {
30224            payload_buf[0..avail_len].copy_from_slice(__input);
30225            Bytes::new(&payload_buf)
30226        } else {
30227            Bytes::new(__input)
30228        };
30229        let mut __struct = Self::default();
30230        __struct.target_system = buf.get_u8()?;
30231        __struct.target_component = buf.get_u8()?;
30232        for v in &mut __struct.id_or_mac {
30233            let val = buf.get_u8()?;
30234            *v = val;
30235        }
30236        let tmp = buf.get_u8()?;
30237        __struct.id_type =
30238            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30239                enum_type: "MavOdidIdType",
30240                value: tmp as u64,
30241            })?;
30242        let tmp = buf.get_u8()?;
30243        __struct.ua_type =
30244            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30245                enum_type: "MavOdidUaType",
30246                value: tmp as u64,
30247            })?;
30248        for v in &mut __struct.uas_id {
30249            let val = buf.get_u8()?;
30250            *v = val;
30251        }
30252        Ok(__struct)
30253    }
30254    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30255        let mut __tmp = BytesMut::new(bytes);
30256        #[allow(clippy::absurd_extreme_comparisons)]
30257        #[allow(unused_comparisons)]
30258        if __tmp.remaining() < Self::ENCODED_LEN {
30259            panic!(
30260                "buffer is too small (need {} bytes, but got {})",
30261                Self::ENCODED_LEN,
30262                __tmp.remaining(),
30263            )
30264        }
30265        __tmp.put_u8(self.target_system);
30266        __tmp.put_u8(self.target_component);
30267        for val in &self.id_or_mac {
30268            __tmp.put_u8(*val);
30269        }
30270        __tmp.put_u8(self.id_type as u8);
30271        __tmp.put_u8(self.ua_type as u8);
30272        for val in &self.uas_id {
30273            __tmp.put_u8(*val);
30274        }
30275        if matches!(version, MavlinkVersion::V2) {
30276            let len = __tmp.len();
30277            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30278        } else {
30279            __tmp.len()
30280        }
30281    }
30282}
30283#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
30284#[doc = ""]
30285#[doc = "ID: 12901"]
30286#[derive(Debug, Clone, PartialEq)]
30287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30288#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30289#[cfg_attr(feature = "ts", derive(TS))]
30290#[cfg_attr(feature = "ts", ts(export))]
30291pub struct OPEN_DRONE_ID_LOCATION_DATA {
30292    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
30293    pub latitude: i32,
30294    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
30295    pub longitude: i32,
30296    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
30297    pub altitude_barometric: f32,
30298    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
30299    pub altitude_geodetic: f32,
30300    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
30301    pub height: f32,
30302    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
30303    pub timestamp: f32,
30304    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
30305    pub direction: u16,
30306    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
30307    pub speed_horizontal: u16,
30308    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
30309    pub speed_vertical: i16,
30310    #[doc = "System ID (0 for broadcast)."]
30311    pub target_system: u8,
30312    #[doc = "Component ID (0 for broadcast)."]
30313    pub target_component: u8,
30314    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
30315    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30316    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30317    pub id_or_mac: [u8; 20],
30318    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
30319    pub status: MavOdidStatus,
30320    #[doc = "Indicates the reference point for the height field."]
30321    pub height_reference: MavOdidHeightRef,
30322    #[doc = "The accuracy of the horizontal position."]
30323    pub horizontal_accuracy: MavOdidHorAcc,
30324    #[doc = "The accuracy of the vertical position."]
30325    pub vertical_accuracy: MavOdidVerAcc,
30326    #[doc = "The accuracy of the barometric altitude."]
30327    pub barometer_accuracy: MavOdidVerAcc,
30328    #[doc = "The accuracy of the horizontal and vertical speed."]
30329    pub speed_accuracy: MavOdidSpeedAcc,
30330    #[doc = "The accuracy of the timestamps."]
30331    pub timestamp_accuracy: MavOdidTimeAcc,
30332}
30333impl OPEN_DRONE_ID_LOCATION_DATA {
30334    pub const ENCODED_LEN: usize = 59usize;
30335    pub const DEFAULT: Self = Self {
30336        latitude: 0_i32,
30337        longitude: 0_i32,
30338        altitude_barometric: 0.0_f32,
30339        altitude_geodetic: 0.0_f32,
30340        height: 0.0_f32,
30341        timestamp: 0.0_f32,
30342        direction: 0_u16,
30343        speed_horizontal: 0_u16,
30344        speed_vertical: 0_i16,
30345        target_system: 0_u8,
30346        target_component: 0_u8,
30347        id_or_mac: [0_u8; 20usize],
30348        status: MavOdidStatus::DEFAULT,
30349        height_reference: MavOdidHeightRef::DEFAULT,
30350        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
30351        vertical_accuracy: MavOdidVerAcc::DEFAULT,
30352        barometer_accuracy: MavOdidVerAcc::DEFAULT,
30353        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
30354        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
30355    };
30356    #[cfg(feature = "arbitrary")]
30357    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30358        use arbitrary::{Arbitrary, Unstructured};
30359        let mut buf = [0u8; 1024];
30360        rng.fill_bytes(&mut buf);
30361        let mut unstructured = Unstructured::new(&buf);
30362        Self::arbitrary(&mut unstructured).unwrap_or_default()
30363    }
30364}
30365impl Default for OPEN_DRONE_ID_LOCATION_DATA {
30366    fn default() -> Self {
30367        Self::DEFAULT.clone()
30368    }
30369}
30370impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
30371    type Message = MavMessage;
30372    const ID: u32 = 12901u32;
30373    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
30374    const EXTRA_CRC: u8 = 254u8;
30375    const ENCODED_LEN: usize = 59usize;
30376    fn deser(
30377        _version: MavlinkVersion,
30378        __input: &[u8],
30379    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30380        let avail_len = __input.len();
30381        let mut payload_buf = [0; Self::ENCODED_LEN];
30382        let mut buf = if avail_len < Self::ENCODED_LEN {
30383            payload_buf[0..avail_len].copy_from_slice(__input);
30384            Bytes::new(&payload_buf)
30385        } else {
30386            Bytes::new(__input)
30387        };
30388        let mut __struct = Self::default();
30389        __struct.latitude = buf.get_i32_le()?;
30390        __struct.longitude = buf.get_i32_le()?;
30391        __struct.altitude_barometric = buf.get_f32_le()?;
30392        __struct.altitude_geodetic = buf.get_f32_le()?;
30393        __struct.height = buf.get_f32_le()?;
30394        __struct.timestamp = buf.get_f32_le()?;
30395        __struct.direction = buf.get_u16_le()?;
30396        __struct.speed_horizontal = buf.get_u16_le()?;
30397        __struct.speed_vertical = buf.get_i16_le()?;
30398        __struct.target_system = buf.get_u8()?;
30399        __struct.target_component = buf.get_u8()?;
30400        for v in &mut __struct.id_or_mac {
30401            let val = buf.get_u8()?;
30402            *v = val;
30403        }
30404        let tmp = buf.get_u8()?;
30405        __struct.status =
30406            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30407                enum_type: "MavOdidStatus",
30408                value: tmp as u64,
30409            })?;
30410        let tmp = buf.get_u8()?;
30411        __struct.height_reference =
30412            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30413                enum_type: "MavOdidHeightRef",
30414                value: tmp as u64,
30415            })?;
30416        let tmp = buf.get_u8()?;
30417        __struct.horizontal_accuracy =
30418            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30419                enum_type: "MavOdidHorAcc",
30420                value: tmp as u64,
30421            })?;
30422        let tmp = buf.get_u8()?;
30423        __struct.vertical_accuracy =
30424            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30425                enum_type: "MavOdidVerAcc",
30426                value: tmp as u64,
30427            })?;
30428        let tmp = buf.get_u8()?;
30429        __struct.barometer_accuracy =
30430            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30431                enum_type: "MavOdidVerAcc",
30432                value: tmp as u64,
30433            })?;
30434        let tmp = buf.get_u8()?;
30435        __struct.speed_accuracy =
30436            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30437                enum_type: "MavOdidSpeedAcc",
30438                value: tmp as u64,
30439            })?;
30440        let tmp = buf.get_u8()?;
30441        __struct.timestamp_accuracy =
30442            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30443                enum_type: "MavOdidTimeAcc",
30444                value: tmp as u64,
30445            })?;
30446        Ok(__struct)
30447    }
30448    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30449        let mut __tmp = BytesMut::new(bytes);
30450        #[allow(clippy::absurd_extreme_comparisons)]
30451        #[allow(unused_comparisons)]
30452        if __tmp.remaining() < Self::ENCODED_LEN {
30453            panic!(
30454                "buffer is too small (need {} bytes, but got {})",
30455                Self::ENCODED_LEN,
30456                __tmp.remaining(),
30457            )
30458        }
30459        __tmp.put_i32_le(self.latitude);
30460        __tmp.put_i32_le(self.longitude);
30461        __tmp.put_f32_le(self.altitude_barometric);
30462        __tmp.put_f32_le(self.altitude_geodetic);
30463        __tmp.put_f32_le(self.height);
30464        __tmp.put_f32_le(self.timestamp);
30465        __tmp.put_u16_le(self.direction);
30466        __tmp.put_u16_le(self.speed_horizontal);
30467        __tmp.put_i16_le(self.speed_vertical);
30468        __tmp.put_u8(self.target_system);
30469        __tmp.put_u8(self.target_component);
30470        for val in &self.id_or_mac {
30471            __tmp.put_u8(*val);
30472        }
30473        __tmp.put_u8(self.status as u8);
30474        __tmp.put_u8(self.height_reference as u8);
30475        __tmp.put_u8(self.horizontal_accuracy as u8);
30476        __tmp.put_u8(self.vertical_accuracy as u8);
30477        __tmp.put_u8(self.barometer_accuracy as u8);
30478        __tmp.put_u8(self.speed_accuracy as u8);
30479        __tmp.put_u8(self.timestamp_accuracy as u8);
30480        if matches!(version, MavlinkVersion::V2) {
30481            let len = __tmp.len();
30482            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30483        } else {
30484            __tmp.len()
30485        }
30486    }
30487}
30488#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
30489#[doc = ""]
30490#[doc = "ID: 12915"]
30491#[derive(Debug, Clone, PartialEq)]
30492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30493#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30494#[cfg_attr(feature = "ts", derive(TS))]
30495#[cfg_attr(feature = "ts", ts(export))]
30496pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
30497    #[doc = "System ID (0 for broadcast)."]
30498    pub target_system: u8,
30499    #[doc = "Component ID (0 for broadcast)."]
30500    pub target_component: u8,
30501    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
30502    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30503    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30504    pub id_or_mac: [u8; 20],
30505    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
30506    pub single_message_size: u8,
30507    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
30508    pub msg_pack_size: u8,
30509    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
30510    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30511    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30512    pub messages: [u8; 225],
30513}
30514impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
30515    pub const ENCODED_LEN: usize = 249usize;
30516    pub const DEFAULT: Self = Self {
30517        target_system: 0_u8,
30518        target_component: 0_u8,
30519        id_or_mac: [0_u8; 20usize],
30520        single_message_size: 0_u8,
30521        msg_pack_size: 0_u8,
30522        messages: [0_u8; 225usize],
30523    };
30524    #[cfg(feature = "arbitrary")]
30525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30526        use arbitrary::{Arbitrary, Unstructured};
30527        let mut buf = [0u8; 1024];
30528        rng.fill_bytes(&mut buf);
30529        let mut unstructured = Unstructured::new(&buf);
30530        Self::arbitrary(&mut unstructured).unwrap_or_default()
30531    }
30532}
30533impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
30534    fn default() -> Self {
30535        Self::DEFAULT.clone()
30536    }
30537}
30538impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
30539    type Message = MavMessage;
30540    const ID: u32 = 12915u32;
30541    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
30542    const EXTRA_CRC: u8 = 94u8;
30543    const ENCODED_LEN: usize = 249usize;
30544    fn deser(
30545        _version: MavlinkVersion,
30546        __input: &[u8],
30547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30548        let avail_len = __input.len();
30549        let mut payload_buf = [0; Self::ENCODED_LEN];
30550        let mut buf = if avail_len < Self::ENCODED_LEN {
30551            payload_buf[0..avail_len].copy_from_slice(__input);
30552            Bytes::new(&payload_buf)
30553        } else {
30554            Bytes::new(__input)
30555        };
30556        let mut __struct = Self::default();
30557        __struct.target_system = buf.get_u8()?;
30558        __struct.target_component = buf.get_u8()?;
30559        for v in &mut __struct.id_or_mac {
30560            let val = buf.get_u8()?;
30561            *v = val;
30562        }
30563        __struct.single_message_size = buf.get_u8()?;
30564        __struct.msg_pack_size = buf.get_u8()?;
30565        for v in &mut __struct.messages {
30566            let val = buf.get_u8()?;
30567            *v = val;
30568        }
30569        Ok(__struct)
30570    }
30571    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30572        let mut __tmp = BytesMut::new(bytes);
30573        #[allow(clippy::absurd_extreme_comparisons)]
30574        #[allow(unused_comparisons)]
30575        if __tmp.remaining() < Self::ENCODED_LEN {
30576            panic!(
30577                "buffer is too small (need {} bytes, but got {})",
30578                Self::ENCODED_LEN,
30579                __tmp.remaining(),
30580            )
30581        }
30582        __tmp.put_u8(self.target_system);
30583        __tmp.put_u8(self.target_component);
30584        for val in &self.id_or_mac {
30585            __tmp.put_u8(*val);
30586        }
30587        __tmp.put_u8(self.single_message_size);
30588        __tmp.put_u8(self.msg_pack_size);
30589        for val in &self.messages {
30590            __tmp.put_u8(*val);
30591        }
30592        if matches!(version, MavlinkVersion::V2) {
30593            let len = __tmp.len();
30594            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30595        } else {
30596            __tmp.len()
30597        }
30598    }
30599}
30600#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
30601#[doc = ""]
30602#[doc = "ID: 12905"]
30603#[derive(Debug, Clone, PartialEq)]
30604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30606#[cfg_attr(feature = "ts", derive(TS))]
30607#[cfg_attr(feature = "ts", ts(export))]
30608pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
30609    #[doc = "System ID (0 for broadcast)."]
30610    pub target_system: u8,
30611    #[doc = "Component ID (0 for broadcast)."]
30612    pub target_component: u8,
30613    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
30614    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30615    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30616    pub id_or_mac: [u8; 20],
30617    #[doc = "Indicates the type of the operator_id field."]
30618    pub operator_id_type: MavOdidOperatorIdType,
30619    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
30620    #[cfg_attr(feature = "ts", ts(type = "string"))]
30621    pub operator_id: CharArray<20>,
30622}
30623impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
30624    pub const ENCODED_LEN: usize = 43usize;
30625    pub const DEFAULT: Self = Self {
30626        target_system: 0_u8,
30627        target_component: 0_u8,
30628        id_or_mac: [0_u8; 20usize],
30629        operator_id_type: MavOdidOperatorIdType::DEFAULT,
30630        operator_id: CharArray::new([0_u8; 20usize]),
30631    };
30632    #[cfg(feature = "arbitrary")]
30633    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30634        use arbitrary::{Arbitrary, Unstructured};
30635        let mut buf = [0u8; 1024];
30636        rng.fill_bytes(&mut buf);
30637        let mut unstructured = Unstructured::new(&buf);
30638        Self::arbitrary(&mut unstructured).unwrap_or_default()
30639    }
30640}
30641impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
30642    fn default() -> Self {
30643        Self::DEFAULT.clone()
30644    }
30645}
30646impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
30647    type Message = MavMessage;
30648    const ID: u32 = 12905u32;
30649    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
30650    const EXTRA_CRC: u8 = 49u8;
30651    const ENCODED_LEN: usize = 43usize;
30652    fn deser(
30653        _version: MavlinkVersion,
30654        __input: &[u8],
30655    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30656        let avail_len = __input.len();
30657        let mut payload_buf = [0; Self::ENCODED_LEN];
30658        let mut buf = if avail_len < Self::ENCODED_LEN {
30659            payload_buf[0..avail_len].copy_from_slice(__input);
30660            Bytes::new(&payload_buf)
30661        } else {
30662            Bytes::new(__input)
30663        };
30664        let mut __struct = Self::default();
30665        __struct.target_system = buf.get_u8()?;
30666        __struct.target_component = buf.get_u8()?;
30667        for v in &mut __struct.id_or_mac {
30668            let val = buf.get_u8()?;
30669            *v = val;
30670        }
30671        let tmp = buf.get_u8()?;
30672        __struct.operator_id_type =
30673            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30674                enum_type: "MavOdidOperatorIdType",
30675                value: tmp as u64,
30676            })?;
30677        let mut tmp = [0_u8; 20usize];
30678        for v in &mut tmp {
30679            *v = buf.get_u8()?;
30680        }
30681        __struct.operator_id = CharArray::new(tmp);
30682        Ok(__struct)
30683    }
30684    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30685        let mut __tmp = BytesMut::new(bytes);
30686        #[allow(clippy::absurd_extreme_comparisons)]
30687        #[allow(unused_comparisons)]
30688        if __tmp.remaining() < Self::ENCODED_LEN {
30689            panic!(
30690                "buffer is too small (need {} bytes, but got {})",
30691                Self::ENCODED_LEN,
30692                __tmp.remaining(),
30693            )
30694        }
30695        __tmp.put_u8(self.target_system);
30696        __tmp.put_u8(self.target_component);
30697        for val in &self.id_or_mac {
30698            __tmp.put_u8(*val);
30699        }
30700        __tmp.put_u8(self.operator_id_type as u8);
30701        for val in &self.operator_id {
30702            __tmp.put_u8(*val);
30703        }
30704        if matches!(version, MavlinkVersion::V2) {
30705            let len = __tmp.len();
30706            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30707        } else {
30708            __tmp.len()
30709        }
30710    }
30711}
30712#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
30713#[doc = ""]
30714#[doc = "ID: 12903"]
30715#[derive(Debug, Clone, PartialEq)]
30716#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30717#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30718#[cfg_attr(feature = "ts", derive(TS))]
30719#[cfg_attr(feature = "ts", ts(export))]
30720pub struct OPEN_DRONE_ID_SELF_ID_DATA {
30721    #[doc = "System ID (0 for broadcast)."]
30722    pub target_system: u8,
30723    #[doc = "Component ID (0 for broadcast)."]
30724    pub target_component: u8,
30725    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
30726    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30727    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30728    pub id_or_mac: [u8; 20],
30729    #[doc = "Indicates the type of the description field."]
30730    pub description_type: MavOdidDescType,
30731    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
30732    #[cfg_attr(feature = "ts", ts(type = "string"))]
30733    pub description: CharArray<23>,
30734}
30735impl OPEN_DRONE_ID_SELF_ID_DATA {
30736    pub const ENCODED_LEN: usize = 46usize;
30737    pub const DEFAULT: Self = Self {
30738        target_system: 0_u8,
30739        target_component: 0_u8,
30740        id_or_mac: [0_u8; 20usize],
30741        description_type: MavOdidDescType::DEFAULT,
30742        description: CharArray::new([0_u8; 23usize]),
30743    };
30744    #[cfg(feature = "arbitrary")]
30745    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30746        use arbitrary::{Arbitrary, Unstructured};
30747        let mut buf = [0u8; 1024];
30748        rng.fill_bytes(&mut buf);
30749        let mut unstructured = Unstructured::new(&buf);
30750        Self::arbitrary(&mut unstructured).unwrap_or_default()
30751    }
30752}
30753impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
30754    fn default() -> Self {
30755        Self::DEFAULT.clone()
30756    }
30757}
30758impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
30759    type Message = MavMessage;
30760    const ID: u32 = 12903u32;
30761    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
30762    const EXTRA_CRC: u8 = 249u8;
30763    const ENCODED_LEN: usize = 46usize;
30764    fn deser(
30765        _version: MavlinkVersion,
30766        __input: &[u8],
30767    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30768        let avail_len = __input.len();
30769        let mut payload_buf = [0; Self::ENCODED_LEN];
30770        let mut buf = if avail_len < Self::ENCODED_LEN {
30771            payload_buf[0..avail_len].copy_from_slice(__input);
30772            Bytes::new(&payload_buf)
30773        } else {
30774            Bytes::new(__input)
30775        };
30776        let mut __struct = Self::default();
30777        __struct.target_system = buf.get_u8()?;
30778        __struct.target_component = buf.get_u8()?;
30779        for v in &mut __struct.id_or_mac {
30780            let val = buf.get_u8()?;
30781            *v = val;
30782        }
30783        let tmp = buf.get_u8()?;
30784        __struct.description_type =
30785            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30786                enum_type: "MavOdidDescType",
30787                value: tmp as u64,
30788            })?;
30789        let mut tmp = [0_u8; 23usize];
30790        for v in &mut tmp {
30791            *v = buf.get_u8()?;
30792        }
30793        __struct.description = CharArray::new(tmp);
30794        Ok(__struct)
30795    }
30796    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30797        let mut __tmp = BytesMut::new(bytes);
30798        #[allow(clippy::absurd_extreme_comparisons)]
30799        #[allow(unused_comparisons)]
30800        if __tmp.remaining() < Self::ENCODED_LEN {
30801            panic!(
30802                "buffer is too small (need {} bytes, but got {})",
30803                Self::ENCODED_LEN,
30804                __tmp.remaining(),
30805            )
30806        }
30807        __tmp.put_u8(self.target_system);
30808        __tmp.put_u8(self.target_component);
30809        for val in &self.id_or_mac {
30810            __tmp.put_u8(*val);
30811        }
30812        __tmp.put_u8(self.description_type as u8);
30813        for val in &self.description {
30814            __tmp.put_u8(*val);
30815        }
30816        if matches!(version, MavlinkVersion::V2) {
30817            let len = __tmp.len();
30818            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30819        } else {
30820            __tmp.len()
30821        }
30822    }
30823}
30824#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
30825#[doc = ""]
30826#[doc = "ID: 12904"]
30827#[derive(Debug, Clone, PartialEq)]
30828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30830#[cfg_attr(feature = "ts", derive(TS))]
30831#[cfg_attr(feature = "ts", ts(export))]
30832pub struct OPEN_DRONE_ID_SYSTEM_DATA {
30833    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
30834    pub operator_latitude: i32,
30835    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
30836    pub operator_longitude: i32,
30837    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
30838    pub area_ceiling: f32,
30839    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
30840    pub area_floor: f32,
30841    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
30842    pub operator_altitude_geo: f32,
30843    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
30844    pub timestamp: u32,
30845    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
30846    pub area_count: u16,
30847    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
30848    pub area_radius: u16,
30849    #[doc = "System ID (0 for broadcast)."]
30850    pub target_system: u8,
30851    #[doc = "Component ID (0 for broadcast)."]
30852    pub target_component: u8,
30853    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
30854    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30855    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30856    pub id_or_mac: [u8; 20],
30857    #[doc = "Specifies the operator location type."]
30858    pub operator_location_type: MavOdidOperatorLocationType,
30859    #[doc = "Specifies the classification type of the UA."]
30860    pub classification_type: MavOdidClassificationType,
30861    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
30862    pub category_eu: MavOdidCategoryEu,
30863    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
30864    pub class_eu: MavOdidClassEu,
30865}
30866impl OPEN_DRONE_ID_SYSTEM_DATA {
30867    pub const ENCODED_LEN: usize = 54usize;
30868    pub const DEFAULT: Self = Self {
30869        operator_latitude: 0_i32,
30870        operator_longitude: 0_i32,
30871        area_ceiling: 0.0_f32,
30872        area_floor: 0.0_f32,
30873        operator_altitude_geo: 0.0_f32,
30874        timestamp: 0_u32,
30875        area_count: 0_u16,
30876        area_radius: 0_u16,
30877        target_system: 0_u8,
30878        target_component: 0_u8,
30879        id_or_mac: [0_u8; 20usize],
30880        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
30881        classification_type: MavOdidClassificationType::DEFAULT,
30882        category_eu: MavOdidCategoryEu::DEFAULT,
30883        class_eu: MavOdidClassEu::DEFAULT,
30884    };
30885    #[cfg(feature = "arbitrary")]
30886    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30887        use arbitrary::{Arbitrary, Unstructured};
30888        let mut buf = [0u8; 1024];
30889        rng.fill_bytes(&mut buf);
30890        let mut unstructured = Unstructured::new(&buf);
30891        Self::arbitrary(&mut unstructured).unwrap_or_default()
30892    }
30893}
30894impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
30895    fn default() -> Self {
30896        Self::DEFAULT.clone()
30897    }
30898}
30899impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
30900    type Message = MavMessage;
30901    const ID: u32 = 12904u32;
30902    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
30903    const EXTRA_CRC: u8 = 77u8;
30904    const ENCODED_LEN: usize = 54usize;
30905    fn deser(
30906        _version: MavlinkVersion,
30907        __input: &[u8],
30908    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30909        let avail_len = __input.len();
30910        let mut payload_buf = [0; Self::ENCODED_LEN];
30911        let mut buf = if avail_len < Self::ENCODED_LEN {
30912            payload_buf[0..avail_len].copy_from_slice(__input);
30913            Bytes::new(&payload_buf)
30914        } else {
30915            Bytes::new(__input)
30916        };
30917        let mut __struct = Self::default();
30918        __struct.operator_latitude = buf.get_i32_le()?;
30919        __struct.operator_longitude = buf.get_i32_le()?;
30920        __struct.area_ceiling = buf.get_f32_le()?;
30921        __struct.area_floor = buf.get_f32_le()?;
30922        __struct.operator_altitude_geo = buf.get_f32_le()?;
30923        __struct.timestamp = buf.get_u32_le()?;
30924        __struct.area_count = buf.get_u16_le()?;
30925        __struct.area_radius = buf.get_u16_le()?;
30926        __struct.target_system = buf.get_u8()?;
30927        __struct.target_component = buf.get_u8()?;
30928        for v in &mut __struct.id_or_mac {
30929            let val = buf.get_u8()?;
30930            *v = val;
30931        }
30932        let tmp = buf.get_u8()?;
30933        __struct.operator_location_type =
30934            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30935                enum_type: "MavOdidOperatorLocationType",
30936                value: tmp as u64,
30937            })?;
30938        let tmp = buf.get_u8()?;
30939        __struct.classification_type =
30940            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30941                enum_type: "MavOdidClassificationType",
30942                value: tmp as u64,
30943            })?;
30944        let tmp = buf.get_u8()?;
30945        __struct.category_eu =
30946            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30947                enum_type: "MavOdidCategoryEu",
30948                value: tmp as u64,
30949            })?;
30950        let tmp = buf.get_u8()?;
30951        __struct.class_eu =
30952            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30953                enum_type: "MavOdidClassEu",
30954                value: tmp as u64,
30955            })?;
30956        Ok(__struct)
30957    }
30958    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30959        let mut __tmp = BytesMut::new(bytes);
30960        #[allow(clippy::absurd_extreme_comparisons)]
30961        #[allow(unused_comparisons)]
30962        if __tmp.remaining() < Self::ENCODED_LEN {
30963            panic!(
30964                "buffer is too small (need {} bytes, but got {})",
30965                Self::ENCODED_LEN,
30966                __tmp.remaining(),
30967            )
30968        }
30969        __tmp.put_i32_le(self.operator_latitude);
30970        __tmp.put_i32_le(self.operator_longitude);
30971        __tmp.put_f32_le(self.area_ceiling);
30972        __tmp.put_f32_le(self.area_floor);
30973        __tmp.put_f32_le(self.operator_altitude_geo);
30974        __tmp.put_u32_le(self.timestamp);
30975        __tmp.put_u16_le(self.area_count);
30976        __tmp.put_u16_le(self.area_radius);
30977        __tmp.put_u8(self.target_system);
30978        __tmp.put_u8(self.target_component);
30979        for val in &self.id_or_mac {
30980            __tmp.put_u8(*val);
30981        }
30982        __tmp.put_u8(self.operator_location_type as u8);
30983        __tmp.put_u8(self.classification_type as u8);
30984        __tmp.put_u8(self.category_eu as u8);
30985        __tmp.put_u8(self.class_eu as u8);
30986        if matches!(version, MavlinkVersion::V2) {
30987            let len = __tmp.len();
30988            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30989        } else {
30990            __tmp.len()
30991        }
30992    }
30993}
30994#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
30995#[doc = ""]
30996#[doc = "ID: 12919"]
30997#[derive(Debug, Clone, PartialEq)]
30998#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30999#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31000#[cfg_attr(feature = "ts", derive(TS))]
31001#[cfg_attr(feature = "ts", ts(export))]
31002pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
31003    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
31004    pub operator_latitude: i32,
31005    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
31006    pub operator_longitude: i32,
31007    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
31008    pub operator_altitude_geo: f32,
31009    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
31010    pub timestamp: u32,
31011    #[doc = "System ID (0 for broadcast)."]
31012    pub target_system: u8,
31013    #[doc = "Component ID (0 for broadcast)."]
31014    pub target_component: u8,
31015}
31016impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
31017    pub const ENCODED_LEN: usize = 18usize;
31018    pub const DEFAULT: Self = Self {
31019        operator_latitude: 0_i32,
31020        operator_longitude: 0_i32,
31021        operator_altitude_geo: 0.0_f32,
31022        timestamp: 0_u32,
31023        target_system: 0_u8,
31024        target_component: 0_u8,
31025    };
31026    #[cfg(feature = "arbitrary")]
31027    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31028        use arbitrary::{Arbitrary, Unstructured};
31029        let mut buf = [0u8; 1024];
31030        rng.fill_bytes(&mut buf);
31031        let mut unstructured = Unstructured::new(&buf);
31032        Self::arbitrary(&mut unstructured).unwrap_or_default()
31033    }
31034}
31035impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
31036    fn default() -> Self {
31037        Self::DEFAULT.clone()
31038    }
31039}
31040impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
31041    type Message = MavMessage;
31042    const ID: u32 = 12919u32;
31043    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
31044    const EXTRA_CRC: u8 = 7u8;
31045    const ENCODED_LEN: usize = 18usize;
31046    fn deser(
31047        _version: MavlinkVersion,
31048        __input: &[u8],
31049    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31050        let avail_len = __input.len();
31051        let mut payload_buf = [0; Self::ENCODED_LEN];
31052        let mut buf = if avail_len < Self::ENCODED_LEN {
31053            payload_buf[0..avail_len].copy_from_slice(__input);
31054            Bytes::new(&payload_buf)
31055        } else {
31056            Bytes::new(__input)
31057        };
31058        let mut __struct = Self::default();
31059        __struct.operator_latitude = buf.get_i32_le()?;
31060        __struct.operator_longitude = buf.get_i32_le()?;
31061        __struct.operator_altitude_geo = buf.get_f32_le()?;
31062        __struct.timestamp = buf.get_u32_le()?;
31063        __struct.target_system = buf.get_u8()?;
31064        __struct.target_component = buf.get_u8()?;
31065        Ok(__struct)
31066    }
31067    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31068        let mut __tmp = BytesMut::new(bytes);
31069        #[allow(clippy::absurd_extreme_comparisons)]
31070        #[allow(unused_comparisons)]
31071        if __tmp.remaining() < Self::ENCODED_LEN {
31072            panic!(
31073                "buffer is too small (need {} bytes, but got {})",
31074                Self::ENCODED_LEN,
31075                __tmp.remaining(),
31076            )
31077        }
31078        __tmp.put_i32_le(self.operator_latitude);
31079        __tmp.put_i32_le(self.operator_longitude);
31080        __tmp.put_f32_le(self.operator_altitude_geo);
31081        __tmp.put_u32_le(self.timestamp);
31082        __tmp.put_u8(self.target_system);
31083        __tmp.put_u8(self.target_component);
31084        if matches!(version, MavlinkVersion::V2) {
31085            let len = __tmp.len();
31086            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31087        } else {
31088            __tmp.len()
31089        }
31090    }
31091}
31092#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
31093#[doc = ""]
31094#[doc = "ID: 100"]
31095#[derive(Debug, Clone, PartialEq)]
31096#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31097#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31098#[cfg_attr(feature = "ts", derive(TS))]
31099#[cfg_attr(feature = "ts", ts(export))]
31100pub struct OPTICAL_FLOW_DATA {
31101    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31102    pub time_usec: u64,
31103    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
31104    pub flow_comp_m_x: f32,
31105    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
31106    pub flow_comp_m_y: f32,
31107    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
31108    pub ground_distance: f32,
31109    #[doc = "Flow in x-sensor direction"]
31110    pub flow_x: i16,
31111    #[doc = "Flow in y-sensor direction"]
31112    pub flow_y: i16,
31113    #[doc = "Sensor ID"]
31114    pub sensor_id: u8,
31115    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
31116    pub quality: u8,
31117    #[doc = "Flow rate about X axis"]
31118    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31119    pub flow_rate_x: f32,
31120    #[doc = "Flow rate about Y axis"]
31121    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31122    pub flow_rate_y: f32,
31123}
31124impl OPTICAL_FLOW_DATA {
31125    pub const ENCODED_LEN: usize = 34usize;
31126    pub const DEFAULT: Self = Self {
31127        time_usec: 0_u64,
31128        flow_comp_m_x: 0.0_f32,
31129        flow_comp_m_y: 0.0_f32,
31130        ground_distance: 0.0_f32,
31131        flow_x: 0_i16,
31132        flow_y: 0_i16,
31133        sensor_id: 0_u8,
31134        quality: 0_u8,
31135        flow_rate_x: 0.0_f32,
31136        flow_rate_y: 0.0_f32,
31137    };
31138    #[cfg(feature = "arbitrary")]
31139    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31140        use arbitrary::{Arbitrary, Unstructured};
31141        let mut buf = [0u8; 1024];
31142        rng.fill_bytes(&mut buf);
31143        let mut unstructured = Unstructured::new(&buf);
31144        Self::arbitrary(&mut unstructured).unwrap_or_default()
31145    }
31146}
31147impl Default for OPTICAL_FLOW_DATA {
31148    fn default() -> Self {
31149        Self::DEFAULT.clone()
31150    }
31151}
31152impl MessageData for OPTICAL_FLOW_DATA {
31153    type Message = MavMessage;
31154    const ID: u32 = 100u32;
31155    const NAME: &'static str = "OPTICAL_FLOW";
31156    const EXTRA_CRC: u8 = 175u8;
31157    const ENCODED_LEN: usize = 34usize;
31158    fn deser(
31159        _version: MavlinkVersion,
31160        __input: &[u8],
31161    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31162        let avail_len = __input.len();
31163        let mut payload_buf = [0; Self::ENCODED_LEN];
31164        let mut buf = if avail_len < Self::ENCODED_LEN {
31165            payload_buf[0..avail_len].copy_from_slice(__input);
31166            Bytes::new(&payload_buf)
31167        } else {
31168            Bytes::new(__input)
31169        };
31170        let mut __struct = Self::default();
31171        __struct.time_usec = buf.get_u64_le()?;
31172        __struct.flow_comp_m_x = buf.get_f32_le()?;
31173        __struct.flow_comp_m_y = buf.get_f32_le()?;
31174        __struct.ground_distance = buf.get_f32_le()?;
31175        __struct.flow_x = buf.get_i16_le()?;
31176        __struct.flow_y = buf.get_i16_le()?;
31177        __struct.sensor_id = buf.get_u8()?;
31178        __struct.quality = buf.get_u8()?;
31179        __struct.flow_rate_x = buf.get_f32_le()?;
31180        __struct.flow_rate_y = buf.get_f32_le()?;
31181        Ok(__struct)
31182    }
31183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31184        let mut __tmp = BytesMut::new(bytes);
31185        #[allow(clippy::absurd_extreme_comparisons)]
31186        #[allow(unused_comparisons)]
31187        if __tmp.remaining() < Self::ENCODED_LEN {
31188            panic!(
31189                "buffer is too small (need {} bytes, but got {})",
31190                Self::ENCODED_LEN,
31191                __tmp.remaining(),
31192            )
31193        }
31194        __tmp.put_u64_le(self.time_usec);
31195        __tmp.put_f32_le(self.flow_comp_m_x);
31196        __tmp.put_f32_le(self.flow_comp_m_y);
31197        __tmp.put_f32_le(self.ground_distance);
31198        __tmp.put_i16_le(self.flow_x);
31199        __tmp.put_i16_le(self.flow_y);
31200        __tmp.put_u8(self.sensor_id);
31201        __tmp.put_u8(self.quality);
31202        if matches!(version, MavlinkVersion::V2) {
31203            __tmp.put_f32_le(self.flow_rate_x);
31204            __tmp.put_f32_le(self.flow_rate_y);
31205            let len = __tmp.len();
31206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31207        } else {
31208            __tmp.len()
31209        }
31210    }
31211}
31212#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
31213#[doc = ""]
31214#[doc = "ID: 106"]
31215#[derive(Debug, Clone, PartialEq)]
31216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31218#[cfg_attr(feature = "ts", derive(TS))]
31219#[cfg_attr(feature = "ts", ts(export))]
31220pub struct OPTICAL_FLOW_RAD_DATA {
31221    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31222    pub time_usec: u64,
31223    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
31224    pub integration_time_us: u32,
31225    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
31226    pub integrated_x: f32,
31227    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
31228    pub integrated_y: f32,
31229    #[doc = "RH rotation around X axis"]
31230    pub integrated_xgyro: f32,
31231    #[doc = "RH rotation around Y axis"]
31232    pub integrated_ygyro: f32,
31233    #[doc = "RH rotation around Z axis"]
31234    pub integrated_zgyro: f32,
31235    #[doc = "Time since the distance was sampled."]
31236    pub time_delta_distance_us: u32,
31237    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
31238    pub distance: f32,
31239    #[doc = "Temperature"]
31240    pub temperature: i16,
31241    #[doc = "Sensor ID"]
31242    pub sensor_id: u8,
31243    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
31244    pub quality: u8,
31245}
31246impl OPTICAL_FLOW_RAD_DATA {
31247    pub const ENCODED_LEN: usize = 44usize;
31248    pub const DEFAULT: Self = Self {
31249        time_usec: 0_u64,
31250        integration_time_us: 0_u32,
31251        integrated_x: 0.0_f32,
31252        integrated_y: 0.0_f32,
31253        integrated_xgyro: 0.0_f32,
31254        integrated_ygyro: 0.0_f32,
31255        integrated_zgyro: 0.0_f32,
31256        time_delta_distance_us: 0_u32,
31257        distance: 0.0_f32,
31258        temperature: 0_i16,
31259        sensor_id: 0_u8,
31260        quality: 0_u8,
31261    };
31262    #[cfg(feature = "arbitrary")]
31263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31264        use arbitrary::{Arbitrary, Unstructured};
31265        let mut buf = [0u8; 1024];
31266        rng.fill_bytes(&mut buf);
31267        let mut unstructured = Unstructured::new(&buf);
31268        Self::arbitrary(&mut unstructured).unwrap_or_default()
31269    }
31270}
31271impl Default for OPTICAL_FLOW_RAD_DATA {
31272    fn default() -> Self {
31273        Self::DEFAULT.clone()
31274    }
31275}
31276impl MessageData for OPTICAL_FLOW_RAD_DATA {
31277    type Message = MavMessage;
31278    const ID: u32 = 106u32;
31279    const NAME: &'static str = "OPTICAL_FLOW_RAD";
31280    const EXTRA_CRC: u8 = 138u8;
31281    const ENCODED_LEN: usize = 44usize;
31282    fn deser(
31283        _version: MavlinkVersion,
31284        __input: &[u8],
31285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31286        let avail_len = __input.len();
31287        let mut payload_buf = [0; Self::ENCODED_LEN];
31288        let mut buf = if avail_len < Self::ENCODED_LEN {
31289            payload_buf[0..avail_len].copy_from_slice(__input);
31290            Bytes::new(&payload_buf)
31291        } else {
31292            Bytes::new(__input)
31293        };
31294        let mut __struct = Self::default();
31295        __struct.time_usec = buf.get_u64_le()?;
31296        __struct.integration_time_us = buf.get_u32_le()?;
31297        __struct.integrated_x = buf.get_f32_le()?;
31298        __struct.integrated_y = buf.get_f32_le()?;
31299        __struct.integrated_xgyro = buf.get_f32_le()?;
31300        __struct.integrated_ygyro = buf.get_f32_le()?;
31301        __struct.integrated_zgyro = buf.get_f32_le()?;
31302        __struct.time_delta_distance_us = buf.get_u32_le()?;
31303        __struct.distance = buf.get_f32_le()?;
31304        __struct.temperature = buf.get_i16_le()?;
31305        __struct.sensor_id = buf.get_u8()?;
31306        __struct.quality = buf.get_u8()?;
31307        Ok(__struct)
31308    }
31309    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31310        let mut __tmp = BytesMut::new(bytes);
31311        #[allow(clippy::absurd_extreme_comparisons)]
31312        #[allow(unused_comparisons)]
31313        if __tmp.remaining() < Self::ENCODED_LEN {
31314            panic!(
31315                "buffer is too small (need {} bytes, but got {})",
31316                Self::ENCODED_LEN,
31317                __tmp.remaining(),
31318            )
31319        }
31320        __tmp.put_u64_le(self.time_usec);
31321        __tmp.put_u32_le(self.integration_time_us);
31322        __tmp.put_f32_le(self.integrated_x);
31323        __tmp.put_f32_le(self.integrated_y);
31324        __tmp.put_f32_le(self.integrated_xgyro);
31325        __tmp.put_f32_le(self.integrated_ygyro);
31326        __tmp.put_f32_le(self.integrated_zgyro);
31327        __tmp.put_u32_le(self.time_delta_distance_us);
31328        __tmp.put_f32_le(self.distance);
31329        __tmp.put_i16_le(self.temperature);
31330        __tmp.put_u8(self.sensor_id);
31331        __tmp.put_u8(self.quality);
31332        if matches!(version, MavlinkVersion::V2) {
31333            let len = __tmp.len();
31334            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31335        } else {
31336            __tmp.len()
31337        }
31338    }
31339}
31340#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
31341#[doc = ""]
31342#[doc = "ID: 360"]
31343#[derive(Debug, Clone, PartialEq)]
31344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31346#[cfg_attr(feature = "ts", derive(TS))]
31347#[cfg_attr(feature = "ts", ts(export))]
31348pub struct ORBIT_EXECUTION_STATUS_DATA {
31349    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31350    pub time_usec: u64,
31351    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
31352    pub radius: f32,
31353    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
31354    pub x: i32,
31355    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
31356    pub y: i32,
31357    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
31358    pub z: f32,
31359    #[doc = "The coordinate system of the fields: x, y, z."]
31360    pub frame: MavFrame,
31361}
31362impl ORBIT_EXECUTION_STATUS_DATA {
31363    pub const ENCODED_LEN: usize = 25usize;
31364    pub const DEFAULT: Self = Self {
31365        time_usec: 0_u64,
31366        radius: 0.0_f32,
31367        x: 0_i32,
31368        y: 0_i32,
31369        z: 0.0_f32,
31370        frame: MavFrame::DEFAULT,
31371    };
31372    #[cfg(feature = "arbitrary")]
31373    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31374        use arbitrary::{Arbitrary, Unstructured};
31375        let mut buf = [0u8; 1024];
31376        rng.fill_bytes(&mut buf);
31377        let mut unstructured = Unstructured::new(&buf);
31378        Self::arbitrary(&mut unstructured).unwrap_or_default()
31379    }
31380}
31381impl Default for ORBIT_EXECUTION_STATUS_DATA {
31382    fn default() -> Self {
31383        Self::DEFAULT.clone()
31384    }
31385}
31386impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
31387    type Message = MavMessage;
31388    const ID: u32 = 360u32;
31389    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
31390    const EXTRA_CRC: u8 = 11u8;
31391    const ENCODED_LEN: usize = 25usize;
31392    fn deser(
31393        _version: MavlinkVersion,
31394        __input: &[u8],
31395    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31396        let avail_len = __input.len();
31397        let mut payload_buf = [0; Self::ENCODED_LEN];
31398        let mut buf = if avail_len < Self::ENCODED_LEN {
31399            payload_buf[0..avail_len].copy_from_slice(__input);
31400            Bytes::new(&payload_buf)
31401        } else {
31402            Bytes::new(__input)
31403        };
31404        let mut __struct = Self::default();
31405        __struct.time_usec = buf.get_u64_le()?;
31406        __struct.radius = buf.get_f32_le()?;
31407        __struct.x = buf.get_i32_le()?;
31408        __struct.y = buf.get_i32_le()?;
31409        __struct.z = buf.get_f32_le()?;
31410        let tmp = buf.get_u8()?;
31411        __struct.frame =
31412            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31413                enum_type: "MavFrame",
31414                value: tmp as u64,
31415            })?;
31416        Ok(__struct)
31417    }
31418    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31419        let mut __tmp = BytesMut::new(bytes);
31420        #[allow(clippy::absurd_extreme_comparisons)]
31421        #[allow(unused_comparisons)]
31422        if __tmp.remaining() < Self::ENCODED_LEN {
31423            panic!(
31424                "buffer is too small (need {} bytes, but got {})",
31425                Self::ENCODED_LEN,
31426                __tmp.remaining(),
31427            )
31428        }
31429        __tmp.put_u64_le(self.time_usec);
31430        __tmp.put_f32_le(self.radius);
31431        __tmp.put_i32_le(self.x);
31432        __tmp.put_i32_le(self.y);
31433        __tmp.put_f32_le(self.z);
31434        __tmp.put_u8(self.frame as u8);
31435        if matches!(version, MavlinkVersion::V2) {
31436            let len = __tmp.len();
31437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31438        } else {
31439            __tmp.len()
31440        }
31441    }
31442}
31443#[doc = "Configure an OSD parameter slot."]
31444#[doc = ""]
31445#[doc = "ID: 11033"]
31446#[derive(Debug, Clone, PartialEq)]
31447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31449#[cfg_attr(feature = "ts", derive(TS))]
31450#[cfg_attr(feature = "ts", ts(export))]
31451pub struct OSD_PARAM_CONFIG_DATA {
31452    #[doc = "Request ID - copied to reply."]
31453    pub request_id: u32,
31454    #[doc = "OSD parameter minimum value."]
31455    pub min_value: f32,
31456    #[doc = "OSD parameter maximum value."]
31457    pub max_value: f32,
31458    #[doc = "OSD parameter increment."]
31459    pub increment: f32,
31460    #[doc = "System ID."]
31461    pub target_system: u8,
31462    #[doc = "Component ID."]
31463    pub target_component: u8,
31464    #[doc = "OSD parameter screen index."]
31465    pub osd_screen: u8,
31466    #[doc = "OSD parameter display index."]
31467    pub osd_index: u8,
31468    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
31469    #[cfg_attr(feature = "ts", ts(type = "string"))]
31470    pub param_id: CharArray<16>,
31471    #[doc = "Config type."]
31472    pub config_type: OsdParamConfigType,
31473}
31474impl OSD_PARAM_CONFIG_DATA {
31475    pub const ENCODED_LEN: usize = 37usize;
31476    pub const DEFAULT: Self = Self {
31477        request_id: 0_u32,
31478        min_value: 0.0_f32,
31479        max_value: 0.0_f32,
31480        increment: 0.0_f32,
31481        target_system: 0_u8,
31482        target_component: 0_u8,
31483        osd_screen: 0_u8,
31484        osd_index: 0_u8,
31485        param_id: CharArray::new([0_u8; 16usize]),
31486        config_type: OsdParamConfigType::DEFAULT,
31487    };
31488    #[cfg(feature = "arbitrary")]
31489    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31490        use arbitrary::{Arbitrary, Unstructured};
31491        let mut buf = [0u8; 1024];
31492        rng.fill_bytes(&mut buf);
31493        let mut unstructured = Unstructured::new(&buf);
31494        Self::arbitrary(&mut unstructured).unwrap_or_default()
31495    }
31496}
31497impl Default for OSD_PARAM_CONFIG_DATA {
31498    fn default() -> Self {
31499        Self::DEFAULT.clone()
31500    }
31501}
31502impl MessageData for OSD_PARAM_CONFIG_DATA {
31503    type Message = MavMessage;
31504    const ID: u32 = 11033u32;
31505    const NAME: &'static str = "OSD_PARAM_CONFIG";
31506    const EXTRA_CRC: u8 = 195u8;
31507    const ENCODED_LEN: usize = 37usize;
31508    fn deser(
31509        _version: MavlinkVersion,
31510        __input: &[u8],
31511    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31512        let avail_len = __input.len();
31513        let mut payload_buf = [0; Self::ENCODED_LEN];
31514        let mut buf = if avail_len < Self::ENCODED_LEN {
31515            payload_buf[0..avail_len].copy_from_slice(__input);
31516            Bytes::new(&payload_buf)
31517        } else {
31518            Bytes::new(__input)
31519        };
31520        let mut __struct = Self::default();
31521        __struct.request_id = buf.get_u32_le()?;
31522        __struct.min_value = buf.get_f32_le()?;
31523        __struct.max_value = buf.get_f32_le()?;
31524        __struct.increment = buf.get_f32_le()?;
31525        __struct.target_system = buf.get_u8()?;
31526        __struct.target_component = buf.get_u8()?;
31527        __struct.osd_screen = buf.get_u8()?;
31528        __struct.osd_index = buf.get_u8()?;
31529        let mut tmp = [0_u8; 16usize];
31530        for v in &mut tmp {
31531            *v = buf.get_u8()?;
31532        }
31533        __struct.param_id = CharArray::new(tmp);
31534        let tmp = buf.get_u8()?;
31535        __struct.config_type =
31536            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31537                enum_type: "OsdParamConfigType",
31538                value: tmp as u64,
31539            })?;
31540        Ok(__struct)
31541    }
31542    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31543        let mut __tmp = BytesMut::new(bytes);
31544        #[allow(clippy::absurd_extreme_comparisons)]
31545        #[allow(unused_comparisons)]
31546        if __tmp.remaining() < Self::ENCODED_LEN {
31547            panic!(
31548                "buffer is too small (need {} bytes, but got {})",
31549                Self::ENCODED_LEN,
31550                __tmp.remaining(),
31551            )
31552        }
31553        __tmp.put_u32_le(self.request_id);
31554        __tmp.put_f32_le(self.min_value);
31555        __tmp.put_f32_le(self.max_value);
31556        __tmp.put_f32_le(self.increment);
31557        __tmp.put_u8(self.target_system);
31558        __tmp.put_u8(self.target_component);
31559        __tmp.put_u8(self.osd_screen);
31560        __tmp.put_u8(self.osd_index);
31561        for val in &self.param_id {
31562            __tmp.put_u8(*val);
31563        }
31564        __tmp.put_u8(self.config_type as u8);
31565        if matches!(version, MavlinkVersion::V2) {
31566            let len = __tmp.len();
31567            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31568        } else {
31569            __tmp.len()
31570        }
31571    }
31572}
31573#[doc = "Configure OSD parameter reply."]
31574#[doc = ""]
31575#[doc = "ID: 11034"]
31576#[derive(Debug, Clone, PartialEq)]
31577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31579#[cfg_attr(feature = "ts", derive(TS))]
31580#[cfg_attr(feature = "ts", ts(export))]
31581pub struct OSD_PARAM_CONFIG_REPLY_DATA {
31582    #[doc = "Request ID - copied from request."]
31583    pub request_id: u32,
31584    #[doc = "Config error type."]
31585    pub result: OsdParamConfigError,
31586}
31587impl OSD_PARAM_CONFIG_REPLY_DATA {
31588    pub const ENCODED_LEN: usize = 5usize;
31589    pub const DEFAULT: Self = Self {
31590        request_id: 0_u32,
31591        result: OsdParamConfigError::DEFAULT,
31592    };
31593    #[cfg(feature = "arbitrary")]
31594    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31595        use arbitrary::{Arbitrary, Unstructured};
31596        let mut buf = [0u8; 1024];
31597        rng.fill_bytes(&mut buf);
31598        let mut unstructured = Unstructured::new(&buf);
31599        Self::arbitrary(&mut unstructured).unwrap_or_default()
31600    }
31601}
31602impl Default for OSD_PARAM_CONFIG_REPLY_DATA {
31603    fn default() -> Self {
31604        Self::DEFAULT.clone()
31605    }
31606}
31607impl MessageData for OSD_PARAM_CONFIG_REPLY_DATA {
31608    type Message = MavMessage;
31609    const ID: u32 = 11034u32;
31610    const NAME: &'static str = "OSD_PARAM_CONFIG_REPLY";
31611    const EXTRA_CRC: u8 = 79u8;
31612    const ENCODED_LEN: usize = 5usize;
31613    fn deser(
31614        _version: MavlinkVersion,
31615        __input: &[u8],
31616    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31617        let avail_len = __input.len();
31618        let mut payload_buf = [0; Self::ENCODED_LEN];
31619        let mut buf = if avail_len < Self::ENCODED_LEN {
31620            payload_buf[0..avail_len].copy_from_slice(__input);
31621            Bytes::new(&payload_buf)
31622        } else {
31623            Bytes::new(__input)
31624        };
31625        let mut __struct = Self::default();
31626        __struct.request_id = buf.get_u32_le()?;
31627        let tmp = buf.get_u8()?;
31628        __struct.result =
31629            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31630                enum_type: "OsdParamConfigError",
31631                value: tmp as u64,
31632            })?;
31633        Ok(__struct)
31634    }
31635    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31636        let mut __tmp = BytesMut::new(bytes);
31637        #[allow(clippy::absurd_extreme_comparisons)]
31638        #[allow(unused_comparisons)]
31639        if __tmp.remaining() < Self::ENCODED_LEN {
31640            panic!(
31641                "buffer is too small (need {} bytes, but got {})",
31642                Self::ENCODED_LEN,
31643                __tmp.remaining(),
31644            )
31645        }
31646        __tmp.put_u32_le(self.request_id);
31647        __tmp.put_u8(self.result as u8);
31648        if matches!(version, MavlinkVersion::V2) {
31649            let len = __tmp.len();
31650            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31651        } else {
31652            __tmp.len()
31653        }
31654    }
31655}
31656#[doc = "Read a configured an OSD parameter slot."]
31657#[doc = ""]
31658#[doc = "ID: 11035"]
31659#[derive(Debug, Clone, PartialEq)]
31660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31661#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31662#[cfg_attr(feature = "ts", derive(TS))]
31663#[cfg_attr(feature = "ts", ts(export))]
31664pub struct OSD_PARAM_SHOW_CONFIG_DATA {
31665    #[doc = "Request ID - copied to reply."]
31666    pub request_id: u32,
31667    #[doc = "System ID."]
31668    pub target_system: u8,
31669    #[doc = "Component ID."]
31670    pub target_component: u8,
31671    #[doc = "OSD parameter screen index."]
31672    pub osd_screen: u8,
31673    #[doc = "OSD parameter display index."]
31674    pub osd_index: u8,
31675}
31676impl OSD_PARAM_SHOW_CONFIG_DATA {
31677    pub const ENCODED_LEN: usize = 8usize;
31678    pub const DEFAULT: Self = Self {
31679        request_id: 0_u32,
31680        target_system: 0_u8,
31681        target_component: 0_u8,
31682        osd_screen: 0_u8,
31683        osd_index: 0_u8,
31684    };
31685    #[cfg(feature = "arbitrary")]
31686    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31687        use arbitrary::{Arbitrary, Unstructured};
31688        let mut buf = [0u8; 1024];
31689        rng.fill_bytes(&mut buf);
31690        let mut unstructured = Unstructured::new(&buf);
31691        Self::arbitrary(&mut unstructured).unwrap_or_default()
31692    }
31693}
31694impl Default for OSD_PARAM_SHOW_CONFIG_DATA {
31695    fn default() -> Self {
31696        Self::DEFAULT.clone()
31697    }
31698}
31699impl MessageData for OSD_PARAM_SHOW_CONFIG_DATA {
31700    type Message = MavMessage;
31701    const ID: u32 = 11035u32;
31702    const NAME: &'static str = "OSD_PARAM_SHOW_CONFIG";
31703    const EXTRA_CRC: u8 = 128u8;
31704    const ENCODED_LEN: usize = 8usize;
31705    fn deser(
31706        _version: MavlinkVersion,
31707        __input: &[u8],
31708    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31709        let avail_len = __input.len();
31710        let mut payload_buf = [0; Self::ENCODED_LEN];
31711        let mut buf = if avail_len < Self::ENCODED_LEN {
31712            payload_buf[0..avail_len].copy_from_slice(__input);
31713            Bytes::new(&payload_buf)
31714        } else {
31715            Bytes::new(__input)
31716        };
31717        let mut __struct = Self::default();
31718        __struct.request_id = buf.get_u32_le()?;
31719        __struct.target_system = buf.get_u8()?;
31720        __struct.target_component = buf.get_u8()?;
31721        __struct.osd_screen = buf.get_u8()?;
31722        __struct.osd_index = buf.get_u8()?;
31723        Ok(__struct)
31724    }
31725    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31726        let mut __tmp = BytesMut::new(bytes);
31727        #[allow(clippy::absurd_extreme_comparisons)]
31728        #[allow(unused_comparisons)]
31729        if __tmp.remaining() < Self::ENCODED_LEN {
31730            panic!(
31731                "buffer is too small (need {} bytes, but got {})",
31732                Self::ENCODED_LEN,
31733                __tmp.remaining(),
31734            )
31735        }
31736        __tmp.put_u32_le(self.request_id);
31737        __tmp.put_u8(self.target_system);
31738        __tmp.put_u8(self.target_component);
31739        __tmp.put_u8(self.osd_screen);
31740        __tmp.put_u8(self.osd_index);
31741        if matches!(version, MavlinkVersion::V2) {
31742            let len = __tmp.len();
31743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31744        } else {
31745            __tmp.len()
31746        }
31747    }
31748}
31749#[doc = "Read configured OSD parameter reply."]
31750#[doc = ""]
31751#[doc = "ID: 11036"]
31752#[derive(Debug, Clone, PartialEq)]
31753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31755#[cfg_attr(feature = "ts", derive(TS))]
31756#[cfg_attr(feature = "ts", ts(export))]
31757pub struct OSD_PARAM_SHOW_CONFIG_REPLY_DATA {
31758    #[doc = "Request ID - copied from request."]
31759    pub request_id: u32,
31760    #[doc = "OSD parameter minimum value."]
31761    pub min_value: f32,
31762    #[doc = "OSD parameter maximum value."]
31763    pub max_value: f32,
31764    #[doc = "OSD parameter increment."]
31765    pub increment: f32,
31766    #[doc = "Config error type."]
31767    pub result: OsdParamConfigError,
31768    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
31769    #[cfg_attr(feature = "ts", ts(type = "string"))]
31770    pub param_id: CharArray<16>,
31771    #[doc = "Config type."]
31772    pub config_type: OsdParamConfigType,
31773}
31774impl OSD_PARAM_SHOW_CONFIG_REPLY_DATA {
31775    pub const ENCODED_LEN: usize = 34usize;
31776    pub const DEFAULT: Self = Self {
31777        request_id: 0_u32,
31778        min_value: 0.0_f32,
31779        max_value: 0.0_f32,
31780        increment: 0.0_f32,
31781        result: OsdParamConfigError::DEFAULT,
31782        param_id: CharArray::new([0_u8; 16usize]),
31783        config_type: OsdParamConfigType::DEFAULT,
31784    };
31785    #[cfg(feature = "arbitrary")]
31786    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31787        use arbitrary::{Arbitrary, Unstructured};
31788        let mut buf = [0u8; 1024];
31789        rng.fill_bytes(&mut buf);
31790        let mut unstructured = Unstructured::new(&buf);
31791        Self::arbitrary(&mut unstructured).unwrap_or_default()
31792    }
31793}
31794impl Default for OSD_PARAM_SHOW_CONFIG_REPLY_DATA {
31795    fn default() -> Self {
31796        Self::DEFAULT.clone()
31797    }
31798}
31799impl MessageData for OSD_PARAM_SHOW_CONFIG_REPLY_DATA {
31800    type Message = MavMessage;
31801    const ID: u32 = 11036u32;
31802    const NAME: &'static str = "OSD_PARAM_SHOW_CONFIG_REPLY";
31803    const EXTRA_CRC: u8 = 177u8;
31804    const ENCODED_LEN: usize = 34usize;
31805    fn deser(
31806        _version: MavlinkVersion,
31807        __input: &[u8],
31808    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31809        let avail_len = __input.len();
31810        let mut payload_buf = [0; Self::ENCODED_LEN];
31811        let mut buf = if avail_len < Self::ENCODED_LEN {
31812            payload_buf[0..avail_len].copy_from_slice(__input);
31813            Bytes::new(&payload_buf)
31814        } else {
31815            Bytes::new(__input)
31816        };
31817        let mut __struct = Self::default();
31818        __struct.request_id = buf.get_u32_le()?;
31819        __struct.min_value = buf.get_f32_le()?;
31820        __struct.max_value = buf.get_f32_le()?;
31821        __struct.increment = buf.get_f32_le()?;
31822        let tmp = buf.get_u8()?;
31823        __struct.result =
31824            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31825                enum_type: "OsdParamConfigError",
31826                value: tmp as u64,
31827            })?;
31828        let mut tmp = [0_u8; 16usize];
31829        for v in &mut tmp {
31830            *v = buf.get_u8()?;
31831        }
31832        __struct.param_id = CharArray::new(tmp);
31833        let tmp = buf.get_u8()?;
31834        __struct.config_type =
31835            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31836                enum_type: "OsdParamConfigType",
31837                value: tmp as u64,
31838            })?;
31839        Ok(__struct)
31840    }
31841    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31842        let mut __tmp = BytesMut::new(bytes);
31843        #[allow(clippy::absurd_extreme_comparisons)]
31844        #[allow(unused_comparisons)]
31845        if __tmp.remaining() < Self::ENCODED_LEN {
31846            panic!(
31847                "buffer is too small (need {} bytes, but got {})",
31848                Self::ENCODED_LEN,
31849                __tmp.remaining(),
31850            )
31851        }
31852        __tmp.put_u32_le(self.request_id);
31853        __tmp.put_f32_le(self.min_value);
31854        __tmp.put_f32_le(self.max_value);
31855        __tmp.put_f32_le(self.increment);
31856        __tmp.put_u8(self.result as u8);
31857        for val in &self.param_id {
31858            __tmp.put_u8(*val);
31859        }
31860        __tmp.put_u8(self.config_type as u8);
31861        if matches!(version, MavlinkVersion::V2) {
31862            let len = __tmp.len();
31863            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31864        } else {
31865            __tmp.len()
31866        }
31867    }
31868}
31869#[doc = "Response from a PARAM_EXT_SET message."]
31870#[doc = ""]
31871#[doc = "ID: 324"]
31872#[derive(Debug, Clone, PartialEq)]
31873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31875#[cfg_attr(feature = "ts", derive(TS))]
31876#[cfg_attr(feature = "ts", ts(export))]
31877pub struct PARAM_EXT_ACK_DATA {
31878    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
31879    #[cfg_attr(feature = "ts", ts(type = "string"))]
31880    pub param_id: CharArray<16>,
31881    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
31882    #[cfg_attr(feature = "ts", ts(type = "string"))]
31883    pub param_value: CharArray<128>,
31884    #[doc = "Parameter type."]
31885    pub param_type: MavParamExtType,
31886    #[doc = "Result code."]
31887    pub param_result: ParamAck,
31888}
31889impl PARAM_EXT_ACK_DATA {
31890    pub const ENCODED_LEN: usize = 146usize;
31891    pub const DEFAULT: Self = Self {
31892        param_id: CharArray::new([0_u8; 16usize]),
31893        param_value: CharArray::new([0_u8; 128usize]),
31894        param_type: MavParamExtType::DEFAULT,
31895        param_result: ParamAck::DEFAULT,
31896    };
31897    #[cfg(feature = "arbitrary")]
31898    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31899        use arbitrary::{Arbitrary, Unstructured};
31900        let mut buf = [0u8; 1024];
31901        rng.fill_bytes(&mut buf);
31902        let mut unstructured = Unstructured::new(&buf);
31903        Self::arbitrary(&mut unstructured).unwrap_or_default()
31904    }
31905}
31906impl Default for PARAM_EXT_ACK_DATA {
31907    fn default() -> Self {
31908        Self::DEFAULT.clone()
31909    }
31910}
31911impl MessageData for PARAM_EXT_ACK_DATA {
31912    type Message = MavMessage;
31913    const ID: u32 = 324u32;
31914    const NAME: &'static str = "PARAM_EXT_ACK";
31915    const EXTRA_CRC: u8 = 132u8;
31916    const ENCODED_LEN: usize = 146usize;
31917    fn deser(
31918        _version: MavlinkVersion,
31919        __input: &[u8],
31920    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31921        let avail_len = __input.len();
31922        let mut payload_buf = [0; Self::ENCODED_LEN];
31923        let mut buf = if avail_len < Self::ENCODED_LEN {
31924            payload_buf[0..avail_len].copy_from_slice(__input);
31925            Bytes::new(&payload_buf)
31926        } else {
31927            Bytes::new(__input)
31928        };
31929        let mut __struct = Self::default();
31930        let mut tmp = [0_u8; 16usize];
31931        for v in &mut tmp {
31932            *v = buf.get_u8()?;
31933        }
31934        __struct.param_id = CharArray::new(tmp);
31935        let mut tmp = [0_u8; 128usize];
31936        for v in &mut tmp {
31937            *v = buf.get_u8()?;
31938        }
31939        __struct.param_value = CharArray::new(tmp);
31940        let tmp = buf.get_u8()?;
31941        __struct.param_type =
31942            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31943                enum_type: "MavParamExtType",
31944                value: tmp as u64,
31945            })?;
31946        let tmp = buf.get_u8()?;
31947        __struct.param_result =
31948            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31949                enum_type: "ParamAck",
31950                value: tmp as u64,
31951            })?;
31952        Ok(__struct)
31953    }
31954    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31955        let mut __tmp = BytesMut::new(bytes);
31956        #[allow(clippy::absurd_extreme_comparisons)]
31957        #[allow(unused_comparisons)]
31958        if __tmp.remaining() < Self::ENCODED_LEN {
31959            panic!(
31960                "buffer is too small (need {} bytes, but got {})",
31961                Self::ENCODED_LEN,
31962                __tmp.remaining(),
31963            )
31964        }
31965        for val in &self.param_id {
31966            __tmp.put_u8(*val);
31967        }
31968        for val in &self.param_value {
31969            __tmp.put_u8(*val);
31970        }
31971        __tmp.put_u8(self.param_type as u8);
31972        __tmp.put_u8(self.param_result as u8);
31973        if matches!(version, MavlinkVersion::V2) {
31974            let len = __tmp.len();
31975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31976        } else {
31977            __tmp.len()
31978        }
31979    }
31980}
31981#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
31982#[doc = ""]
31983#[doc = "ID: 321"]
31984#[derive(Debug, Clone, PartialEq)]
31985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31987#[cfg_attr(feature = "ts", derive(TS))]
31988#[cfg_attr(feature = "ts", ts(export))]
31989pub struct PARAM_EXT_REQUEST_LIST_DATA {
31990    #[doc = "System ID"]
31991    pub target_system: u8,
31992    #[doc = "Component ID"]
31993    pub target_component: u8,
31994}
31995impl PARAM_EXT_REQUEST_LIST_DATA {
31996    pub const ENCODED_LEN: usize = 2usize;
31997    pub const DEFAULT: Self = Self {
31998        target_system: 0_u8,
31999        target_component: 0_u8,
32000    };
32001    #[cfg(feature = "arbitrary")]
32002    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32003        use arbitrary::{Arbitrary, Unstructured};
32004        let mut buf = [0u8; 1024];
32005        rng.fill_bytes(&mut buf);
32006        let mut unstructured = Unstructured::new(&buf);
32007        Self::arbitrary(&mut unstructured).unwrap_or_default()
32008    }
32009}
32010impl Default for PARAM_EXT_REQUEST_LIST_DATA {
32011    fn default() -> Self {
32012        Self::DEFAULT.clone()
32013    }
32014}
32015impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
32016    type Message = MavMessage;
32017    const ID: u32 = 321u32;
32018    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
32019    const EXTRA_CRC: u8 = 88u8;
32020    const ENCODED_LEN: usize = 2usize;
32021    fn deser(
32022        _version: MavlinkVersion,
32023        __input: &[u8],
32024    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32025        let avail_len = __input.len();
32026        let mut payload_buf = [0; Self::ENCODED_LEN];
32027        let mut buf = if avail_len < Self::ENCODED_LEN {
32028            payload_buf[0..avail_len].copy_from_slice(__input);
32029            Bytes::new(&payload_buf)
32030        } else {
32031            Bytes::new(__input)
32032        };
32033        let mut __struct = Self::default();
32034        __struct.target_system = buf.get_u8()?;
32035        __struct.target_component = buf.get_u8()?;
32036        Ok(__struct)
32037    }
32038    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32039        let mut __tmp = BytesMut::new(bytes);
32040        #[allow(clippy::absurd_extreme_comparisons)]
32041        #[allow(unused_comparisons)]
32042        if __tmp.remaining() < Self::ENCODED_LEN {
32043            panic!(
32044                "buffer is too small (need {} bytes, but got {})",
32045                Self::ENCODED_LEN,
32046                __tmp.remaining(),
32047            )
32048        }
32049        __tmp.put_u8(self.target_system);
32050        __tmp.put_u8(self.target_component);
32051        if matches!(version, MavlinkVersion::V2) {
32052            let len = __tmp.len();
32053            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32054        } else {
32055            __tmp.len()
32056        }
32057    }
32058}
32059#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
32060#[doc = ""]
32061#[doc = "ID: 320"]
32062#[derive(Debug, Clone, PartialEq)]
32063#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32065#[cfg_attr(feature = "ts", derive(TS))]
32066#[cfg_attr(feature = "ts", ts(export))]
32067pub struct PARAM_EXT_REQUEST_READ_DATA {
32068    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
32069    pub param_index: i16,
32070    #[doc = "System ID"]
32071    pub target_system: u8,
32072    #[doc = "Component ID"]
32073    pub target_component: u8,
32074    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
32075    #[cfg_attr(feature = "ts", ts(type = "string"))]
32076    pub param_id: CharArray<16>,
32077}
32078impl PARAM_EXT_REQUEST_READ_DATA {
32079    pub const ENCODED_LEN: usize = 20usize;
32080    pub const DEFAULT: Self = Self {
32081        param_index: 0_i16,
32082        target_system: 0_u8,
32083        target_component: 0_u8,
32084        param_id: CharArray::new([0_u8; 16usize]),
32085    };
32086    #[cfg(feature = "arbitrary")]
32087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32088        use arbitrary::{Arbitrary, Unstructured};
32089        let mut buf = [0u8; 1024];
32090        rng.fill_bytes(&mut buf);
32091        let mut unstructured = Unstructured::new(&buf);
32092        Self::arbitrary(&mut unstructured).unwrap_or_default()
32093    }
32094}
32095impl Default for PARAM_EXT_REQUEST_READ_DATA {
32096    fn default() -> Self {
32097        Self::DEFAULT.clone()
32098    }
32099}
32100impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
32101    type Message = MavMessage;
32102    const ID: u32 = 320u32;
32103    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
32104    const EXTRA_CRC: u8 = 243u8;
32105    const ENCODED_LEN: usize = 20usize;
32106    fn deser(
32107        _version: MavlinkVersion,
32108        __input: &[u8],
32109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32110        let avail_len = __input.len();
32111        let mut payload_buf = [0; Self::ENCODED_LEN];
32112        let mut buf = if avail_len < Self::ENCODED_LEN {
32113            payload_buf[0..avail_len].copy_from_slice(__input);
32114            Bytes::new(&payload_buf)
32115        } else {
32116            Bytes::new(__input)
32117        };
32118        let mut __struct = Self::default();
32119        __struct.param_index = buf.get_i16_le()?;
32120        __struct.target_system = buf.get_u8()?;
32121        __struct.target_component = buf.get_u8()?;
32122        let mut tmp = [0_u8; 16usize];
32123        for v in &mut tmp {
32124            *v = buf.get_u8()?;
32125        }
32126        __struct.param_id = CharArray::new(tmp);
32127        Ok(__struct)
32128    }
32129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32130        let mut __tmp = BytesMut::new(bytes);
32131        #[allow(clippy::absurd_extreme_comparisons)]
32132        #[allow(unused_comparisons)]
32133        if __tmp.remaining() < Self::ENCODED_LEN {
32134            panic!(
32135                "buffer is too small (need {} bytes, but got {})",
32136                Self::ENCODED_LEN,
32137                __tmp.remaining(),
32138            )
32139        }
32140        __tmp.put_i16_le(self.param_index);
32141        __tmp.put_u8(self.target_system);
32142        __tmp.put_u8(self.target_component);
32143        for val in &self.param_id {
32144            __tmp.put_u8(*val);
32145        }
32146        if matches!(version, MavlinkVersion::V2) {
32147            let len = __tmp.len();
32148            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32149        } else {
32150            __tmp.len()
32151        }
32152    }
32153}
32154#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
32155#[doc = ""]
32156#[doc = "ID: 323"]
32157#[derive(Debug, Clone, PartialEq)]
32158#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32160#[cfg_attr(feature = "ts", derive(TS))]
32161#[cfg_attr(feature = "ts", ts(export))]
32162pub struct PARAM_EXT_SET_DATA {
32163    #[doc = "System ID"]
32164    pub target_system: u8,
32165    #[doc = "Component ID"]
32166    pub target_component: u8,
32167    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
32168    #[cfg_attr(feature = "ts", ts(type = "string"))]
32169    pub param_id: CharArray<16>,
32170    #[doc = "Parameter value"]
32171    #[cfg_attr(feature = "ts", ts(type = "string"))]
32172    pub param_value: CharArray<128>,
32173    #[doc = "Parameter type."]
32174    pub param_type: MavParamExtType,
32175}
32176impl PARAM_EXT_SET_DATA {
32177    pub const ENCODED_LEN: usize = 147usize;
32178    pub const DEFAULT: Self = Self {
32179        target_system: 0_u8,
32180        target_component: 0_u8,
32181        param_id: CharArray::new([0_u8; 16usize]),
32182        param_value: CharArray::new([0_u8; 128usize]),
32183        param_type: MavParamExtType::DEFAULT,
32184    };
32185    #[cfg(feature = "arbitrary")]
32186    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32187        use arbitrary::{Arbitrary, Unstructured};
32188        let mut buf = [0u8; 1024];
32189        rng.fill_bytes(&mut buf);
32190        let mut unstructured = Unstructured::new(&buf);
32191        Self::arbitrary(&mut unstructured).unwrap_or_default()
32192    }
32193}
32194impl Default for PARAM_EXT_SET_DATA {
32195    fn default() -> Self {
32196        Self::DEFAULT.clone()
32197    }
32198}
32199impl MessageData for PARAM_EXT_SET_DATA {
32200    type Message = MavMessage;
32201    const ID: u32 = 323u32;
32202    const NAME: &'static str = "PARAM_EXT_SET";
32203    const EXTRA_CRC: u8 = 78u8;
32204    const ENCODED_LEN: usize = 147usize;
32205    fn deser(
32206        _version: MavlinkVersion,
32207        __input: &[u8],
32208    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32209        let avail_len = __input.len();
32210        let mut payload_buf = [0; Self::ENCODED_LEN];
32211        let mut buf = if avail_len < Self::ENCODED_LEN {
32212            payload_buf[0..avail_len].copy_from_slice(__input);
32213            Bytes::new(&payload_buf)
32214        } else {
32215            Bytes::new(__input)
32216        };
32217        let mut __struct = Self::default();
32218        __struct.target_system = buf.get_u8()?;
32219        __struct.target_component = buf.get_u8()?;
32220        let mut tmp = [0_u8; 16usize];
32221        for v in &mut tmp {
32222            *v = buf.get_u8()?;
32223        }
32224        __struct.param_id = CharArray::new(tmp);
32225        let mut tmp = [0_u8; 128usize];
32226        for v in &mut tmp {
32227            *v = buf.get_u8()?;
32228        }
32229        __struct.param_value = CharArray::new(tmp);
32230        let tmp = buf.get_u8()?;
32231        __struct.param_type =
32232            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32233                enum_type: "MavParamExtType",
32234                value: tmp as u64,
32235            })?;
32236        Ok(__struct)
32237    }
32238    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32239        let mut __tmp = BytesMut::new(bytes);
32240        #[allow(clippy::absurd_extreme_comparisons)]
32241        #[allow(unused_comparisons)]
32242        if __tmp.remaining() < Self::ENCODED_LEN {
32243            panic!(
32244                "buffer is too small (need {} bytes, but got {})",
32245                Self::ENCODED_LEN,
32246                __tmp.remaining(),
32247            )
32248        }
32249        __tmp.put_u8(self.target_system);
32250        __tmp.put_u8(self.target_component);
32251        for val in &self.param_id {
32252            __tmp.put_u8(*val);
32253        }
32254        for val in &self.param_value {
32255            __tmp.put_u8(*val);
32256        }
32257        __tmp.put_u8(self.param_type as u8);
32258        if matches!(version, MavlinkVersion::V2) {
32259            let len = __tmp.len();
32260            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32261        } else {
32262            __tmp.len()
32263        }
32264    }
32265}
32266#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
32267#[doc = ""]
32268#[doc = "ID: 322"]
32269#[derive(Debug, Clone, PartialEq)]
32270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32272#[cfg_attr(feature = "ts", derive(TS))]
32273#[cfg_attr(feature = "ts", ts(export))]
32274pub struct PARAM_EXT_VALUE_DATA {
32275    #[doc = "Total number of parameters"]
32276    pub param_count: u16,
32277    #[doc = "Index of this parameter"]
32278    pub param_index: u16,
32279    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
32280    #[cfg_attr(feature = "ts", ts(type = "string"))]
32281    pub param_id: CharArray<16>,
32282    #[doc = "Parameter value"]
32283    #[cfg_attr(feature = "ts", ts(type = "string"))]
32284    pub param_value: CharArray<128>,
32285    #[doc = "Parameter type."]
32286    pub param_type: MavParamExtType,
32287}
32288impl PARAM_EXT_VALUE_DATA {
32289    pub const ENCODED_LEN: usize = 149usize;
32290    pub const DEFAULT: Self = Self {
32291        param_count: 0_u16,
32292        param_index: 0_u16,
32293        param_id: CharArray::new([0_u8; 16usize]),
32294        param_value: CharArray::new([0_u8; 128usize]),
32295        param_type: MavParamExtType::DEFAULT,
32296    };
32297    #[cfg(feature = "arbitrary")]
32298    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32299        use arbitrary::{Arbitrary, Unstructured};
32300        let mut buf = [0u8; 1024];
32301        rng.fill_bytes(&mut buf);
32302        let mut unstructured = Unstructured::new(&buf);
32303        Self::arbitrary(&mut unstructured).unwrap_or_default()
32304    }
32305}
32306impl Default for PARAM_EXT_VALUE_DATA {
32307    fn default() -> Self {
32308        Self::DEFAULT.clone()
32309    }
32310}
32311impl MessageData for PARAM_EXT_VALUE_DATA {
32312    type Message = MavMessage;
32313    const ID: u32 = 322u32;
32314    const NAME: &'static str = "PARAM_EXT_VALUE";
32315    const EXTRA_CRC: u8 = 243u8;
32316    const ENCODED_LEN: usize = 149usize;
32317    fn deser(
32318        _version: MavlinkVersion,
32319        __input: &[u8],
32320    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32321        let avail_len = __input.len();
32322        let mut payload_buf = [0; Self::ENCODED_LEN];
32323        let mut buf = if avail_len < Self::ENCODED_LEN {
32324            payload_buf[0..avail_len].copy_from_slice(__input);
32325            Bytes::new(&payload_buf)
32326        } else {
32327            Bytes::new(__input)
32328        };
32329        let mut __struct = Self::default();
32330        __struct.param_count = buf.get_u16_le()?;
32331        __struct.param_index = buf.get_u16_le()?;
32332        let mut tmp = [0_u8; 16usize];
32333        for v in &mut tmp {
32334            *v = buf.get_u8()?;
32335        }
32336        __struct.param_id = CharArray::new(tmp);
32337        let mut tmp = [0_u8; 128usize];
32338        for v in &mut tmp {
32339            *v = buf.get_u8()?;
32340        }
32341        __struct.param_value = CharArray::new(tmp);
32342        let tmp = buf.get_u8()?;
32343        __struct.param_type =
32344            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32345                enum_type: "MavParamExtType",
32346                value: tmp as u64,
32347            })?;
32348        Ok(__struct)
32349    }
32350    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32351        let mut __tmp = BytesMut::new(bytes);
32352        #[allow(clippy::absurd_extreme_comparisons)]
32353        #[allow(unused_comparisons)]
32354        if __tmp.remaining() < Self::ENCODED_LEN {
32355            panic!(
32356                "buffer is too small (need {} bytes, but got {})",
32357                Self::ENCODED_LEN,
32358                __tmp.remaining(),
32359            )
32360        }
32361        __tmp.put_u16_le(self.param_count);
32362        __tmp.put_u16_le(self.param_index);
32363        for val in &self.param_id {
32364            __tmp.put_u8(*val);
32365        }
32366        for val in &self.param_value {
32367            __tmp.put_u8(*val);
32368        }
32369        __tmp.put_u8(self.param_type as u8);
32370        if matches!(version, MavlinkVersion::V2) {
32371            let len = __tmp.len();
32372            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32373        } else {
32374            __tmp.len()
32375        }
32376    }
32377}
32378#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
32379#[doc = ""]
32380#[doc = "ID: 50"]
32381#[derive(Debug, Clone, PartialEq)]
32382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32384#[cfg_attr(feature = "ts", derive(TS))]
32385#[cfg_attr(feature = "ts", ts(export))]
32386pub struct PARAM_MAP_RC_DATA {
32387    #[doc = "Initial parameter value"]
32388    pub param_value0: f32,
32389    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
32390    pub scale: f32,
32391    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
32392    pub param_value_min: f32,
32393    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
32394    pub param_value_max: f32,
32395    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
32396    pub param_index: i16,
32397    #[doc = "System ID"]
32398    pub target_system: u8,
32399    #[doc = "Component ID"]
32400    pub target_component: u8,
32401    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
32402    #[cfg_attr(feature = "ts", ts(type = "string"))]
32403    pub param_id: CharArray<16>,
32404    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
32405    pub parameter_rc_channel_index: u8,
32406}
32407impl PARAM_MAP_RC_DATA {
32408    pub const ENCODED_LEN: usize = 37usize;
32409    pub const DEFAULT: Self = Self {
32410        param_value0: 0.0_f32,
32411        scale: 0.0_f32,
32412        param_value_min: 0.0_f32,
32413        param_value_max: 0.0_f32,
32414        param_index: 0_i16,
32415        target_system: 0_u8,
32416        target_component: 0_u8,
32417        param_id: CharArray::new([0_u8; 16usize]),
32418        parameter_rc_channel_index: 0_u8,
32419    };
32420    #[cfg(feature = "arbitrary")]
32421    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32422        use arbitrary::{Arbitrary, Unstructured};
32423        let mut buf = [0u8; 1024];
32424        rng.fill_bytes(&mut buf);
32425        let mut unstructured = Unstructured::new(&buf);
32426        Self::arbitrary(&mut unstructured).unwrap_or_default()
32427    }
32428}
32429impl Default for PARAM_MAP_RC_DATA {
32430    fn default() -> Self {
32431        Self::DEFAULT.clone()
32432    }
32433}
32434impl MessageData for PARAM_MAP_RC_DATA {
32435    type Message = MavMessage;
32436    const ID: u32 = 50u32;
32437    const NAME: &'static str = "PARAM_MAP_RC";
32438    const EXTRA_CRC: u8 = 78u8;
32439    const ENCODED_LEN: usize = 37usize;
32440    fn deser(
32441        _version: MavlinkVersion,
32442        __input: &[u8],
32443    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32444        let avail_len = __input.len();
32445        let mut payload_buf = [0; Self::ENCODED_LEN];
32446        let mut buf = if avail_len < Self::ENCODED_LEN {
32447            payload_buf[0..avail_len].copy_from_slice(__input);
32448            Bytes::new(&payload_buf)
32449        } else {
32450            Bytes::new(__input)
32451        };
32452        let mut __struct = Self::default();
32453        __struct.param_value0 = buf.get_f32_le()?;
32454        __struct.scale = buf.get_f32_le()?;
32455        __struct.param_value_min = buf.get_f32_le()?;
32456        __struct.param_value_max = buf.get_f32_le()?;
32457        __struct.param_index = buf.get_i16_le()?;
32458        __struct.target_system = buf.get_u8()?;
32459        __struct.target_component = buf.get_u8()?;
32460        let mut tmp = [0_u8; 16usize];
32461        for v in &mut tmp {
32462            *v = buf.get_u8()?;
32463        }
32464        __struct.param_id = CharArray::new(tmp);
32465        __struct.parameter_rc_channel_index = buf.get_u8()?;
32466        Ok(__struct)
32467    }
32468    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32469        let mut __tmp = BytesMut::new(bytes);
32470        #[allow(clippy::absurd_extreme_comparisons)]
32471        #[allow(unused_comparisons)]
32472        if __tmp.remaining() < Self::ENCODED_LEN {
32473            panic!(
32474                "buffer is too small (need {} bytes, but got {})",
32475                Self::ENCODED_LEN,
32476                __tmp.remaining(),
32477            )
32478        }
32479        __tmp.put_f32_le(self.param_value0);
32480        __tmp.put_f32_le(self.scale);
32481        __tmp.put_f32_le(self.param_value_min);
32482        __tmp.put_f32_le(self.param_value_max);
32483        __tmp.put_i16_le(self.param_index);
32484        __tmp.put_u8(self.target_system);
32485        __tmp.put_u8(self.target_component);
32486        for val in &self.param_id {
32487            __tmp.put_u8(*val);
32488        }
32489        __tmp.put_u8(self.parameter_rc_channel_index);
32490        if matches!(version, MavlinkVersion::V2) {
32491            let len = __tmp.len();
32492            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32493        } else {
32494            __tmp.len()
32495        }
32496    }
32497}
32498#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
32499#[doc = ""]
32500#[doc = "ID: 21"]
32501#[derive(Debug, Clone, PartialEq)]
32502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32504#[cfg_attr(feature = "ts", derive(TS))]
32505#[cfg_attr(feature = "ts", ts(export))]
32506pub struct PARAM_REQUEST_LIST_DATA {
32507    #[doc = "System ID"]
32508    pub target_system: u8,
32509    #[doc = "Component ID"]
32510    pub target_component: u8,
32511}
32512impl PARAM_REQUEST_LIST_DATA {
32513    pub const ENCODED_LEN: usize = 2usize;
32514    pub const DEFAULT: Self = Self {
32515        target_system: 0_u8,
32516        target_component: 0_u8,
32517    };
32518    #[cfg(feature = "arbitrary")]
32519    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32520        use arbitrary::{Arbitrary, Unstructured};
32521        let mut buf = [0u8; 1024];
32522        rng.fill_bytes(&mut buf);
32523        let mut unstructured = Unstructured::new(&buf);
32524        Self::arbitrary(&mut unstructured).unwrap_or_default()
32525    }
32526}
32527impl Default for PARAM_REQUEST_LIST_DATA {
32528    fn default() -> Self {
32529        Self::DEFAULT.clone()
32530    }
32531}
32532impl MessageData for PARAM_REQUEST_LIST_DATA {
32533    type Message = MavMessage;
32534    const ID: u32 = 21u32;
32535    const NAME: &'static str = "PARAM_REQUEST_LIST";
32536    const EXTRA_CRC: u8 = 159u8;
32537    const ENCODED_LEN: usize = 2usize;
32538    fn deser(
32539        _version: MavlinkVersion,
32540        __input: &[u8],
32541    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32542        let avail_len = __input.len();
32543        let mut payload_buf = [0; Self::ENCODED_LEN];
32544        let mut buf = if avail_len < Self::ENCODED_LEN {
32545            payload_buf[0..avail_len].copy_from_slice(__input);
32546            Bytes::new(&payload_buf)
32547        } else {
32548            Bytes::new(__input)
32549        };
32550        let mut __struct = Self::default();
32551        __struct.target_system = buf.get_u8()?;
32552        __struct.target_component = buf.get_u8()?;
32553        Ok(__struct)
32554    }
32555    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32556        let mut __tmp = BytesMut::new(bytes);
32557        #[allow(clippy::absurd_extreme_comparisons)]
32558        #[allow(unused_comparisons)]
32559        if __tmp.remaining() < Self::ENCODED_LEN {
32560            panic!(
32561                "buffer is too small (need {} bytes, but got {})",
32562                Self::ENCODED_LEN,
32563                __tmp.remaining(),
32564            )
32565        }
32566        __tmp.put_u8(self.target_system);
32567        __tmp.put_u8(self.target_component);
32568        if matches!(version, MavlinkVersion::V2) {
32569            let len = __tmp.len();
32570            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32571        } else {
32572            __tmp.len()
32573        }
32574    }
32575}
32576#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
32577#[doc = ""]
32578#[doc = "ID: 20"]
32579#[derive(Debug, Clone, PartialEq)]
32580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32582#[cfg_attr(feature = "ts", derive(TS))]
32583#[cfg_attr(feature = "ts", ts(export))]
32584pub struct PARAM_REQUEST_READ_DATA {
32585    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
32586    pub param_index: i16,
32587    #[doc = "System ID"]
32588    pub target_system: u8,
32589    #[doc = "Component ID"]
32590    pub target_component: u8,
32591    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
32592    #[cfg_attr(feature = "ts", ts(type = "string"))]
32593    pub param_id: CharArray<16>,
32594}
32595impl PARAM_REQUEST_READ_DATA {
32596    pub const ENCODED_LEN: usize = 20usize;
32597    pub const DEFAULT: Self = Self {
32598        param_index: 0_i16,
32599        target_system: 0_u8,
32600        target_component: 0_u8,
32601        param_id: CharArray::new([0_u8; 16usize]),
32602    };
32603    #[cfg(feature = "arbitrary")]
32604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32605        use arbitrary::{Arbitrary, Unstructured};
32606        let mut buf = [0u8; 1024];
32607        rng.fill_bytes(&mut buf);
32608        let mut unstructured = Unstructured::new(&buf);
32609        Self::arbitrary(&mut unstructured).unwrap_or_default()
32610    }
32611}
32612impl Default for PARAM_REQUEST_READ_DATA {
32613    fn default() -> Self {
32614        Self::DEFAULT.clone()
32615    }
32616}
32617impl MessageData for PARAM_REQUEST_READ_DATA {
32618    type Message = MavMessage;
32619    const ID: u32 = 20u32;
32620    const NAME: &'static str = "PARAM_REQUEST_READ";
32621    const EXTRA_CRC: u8 = 214u8;
32622    const ENCODED_LEN: usize = 20usize;
32623    fn deser(
32624        _version: MavlinkVersion,
32625        __input: &[u8],
32626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32627        let avail_len = __input.len();
32628        let mut payload_buf = [0; Self::ENCODED_LEN];
32629        let mut buf = if avail_len < Self::ENCODED_LEN {
32630            payload_buf[0..avail_len].copy_from_slice(__input);
32631            Bytes::new(&payload_buf)
32632        } else {
32633            Bytes::new(__input)
32634        };
32635        let mut __struct = Self::default();
32636        __struct.param_index = buf.get_i16_le()?;
32637        __struct.target_system = buf.get_u8()?;
32638        __struct.target_component = buf.get_u8()?;
32639        let mut tmp = [0_u8; 16usize];
32640        for v in &mut tmp {
32641            *v = buf.get_u8()?;
32642        }
32643        __struct.param_id = CharArray::new(tmp);
32644        Ok(__struct)
32645    }
32646    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32647        let mut __tmp = BytesMut::new(bytes);
32648        #[allow(clippy::absurd_extreme_comparisons)]
32649        #[allow(unused_comparisons)]
32650        if __tmp.remaining() < Self::ENCODED_LEN {
32651            panic!(
32652                "buffer is too small (need {} bytes, but got {})",
32653                Self::ENCODED_LEN,
32654                __tmp.remaining(),
32655            )
32656        }
32657        __tmp.put_i16_le(self.param_index);
32658        __tmp.put_u8(self.target_system);
32659        __tmp.put_u8(self.target_component);
32660        for val in &self.param_id {
32661            __tmp.put_u8(*val);
32662        }
32663        if matches!(version, MavlinkVersion::V2) {
32664            let len = __tmp.len();
32665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32666        } else {
32667            __tmp.len()
32668        }
32669    }
32670}
32671#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
32672#[doc = ""]
32673#[doc = "ID: 23"]
32674#[derive(Debug, Clone, PartialEq)]
32675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32677#[cfg_attr(feature = "ts", derive(TS))]
32678#[cfg_attr(feature = "ts", ts(export))]
32679pub struct PARAM_SET_DATA {
32680    #[doc = "Onboard parameter value"]
32681    pub param_value: f32,
32682    #[doc = "System ID"]
32683    pub target_system: u8,
32684    #[doc = "Component ID"]
32685    pub target_component: u8,
32686    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
32687    #[cfg_attr(feature = "ts", ts(type = "string"))]
32688    pub param_id: CharArray<16>,
32689    #[doc = "Onboard parameter type."]
32690    pub param_type: MavParamType,
32691}
32692impl PARAM_SET_DATA {
32693    pub const ENCODED_LEN: usize = 23usize;
32694    pub const DEFAULT: Self = Self {
32695        param_value: 0.0_f32,
32696        target_system: 0_u8,
32697        target_component: 0_u8,
32698        param_id: CharArray::new([0_u8; 16usize]),
32699        param_type: MavParamType::DEFAULT,
32700    };
32701    #[cfg(feature = "arbitrary")]
32702    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32703        use arbitrary::{Arbitrary, Unstructured};
32704        let mut buf = [0u8; 1024];
32705        rng.fill_bytes(&mut buf);
32706        let mut unstructured = Unstructured::new(&buf);
32707        Self::arbitrary(&mut unstructured).unwrap_or_default()
32708    }
32709}
32710impl Default for PARAM_SET_DATA {
32711    fn default() -> Self {
32712        Self::DEFAULT.clone()
32713    }
32714}
32715impl MessageData for PARAM_SET_DATA {
32716    type Message = MavMessage;
32717    const ID: u32 = 23u32;
32718    const NAME: &'static str = "PARAM_SET";
32719    const EXTRA_CRC: u8 = 168u8;
32720    const ENCODED_LEN: usize = 23usize;
32721    fn deser(
32722        _version: MavlinkVersion,
32723        __input: &[u8],
32724    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32725        let avail_len = __input.len();
32726        let mut payload_buf = [0; Self::ENCODED_LEN];
32727        let mut buf = if avail_len < Self::ENCODED_LEN {
32728            payload_buf[0..avail_len].copy_from_slice(__input);
32729            Bytes::new(&payload_buf)
32730        } else {
32731            Bytes::new(__input)
32732        };
32733        let mut __struct = Self::default();
32734        __struct.param_value = buf.get_f32_le()?;
32735        __struct.target_system = buf.get_u8()?;
32736        __struct.target_component = buf.get_u8()?;
32737        let mut tmp = [0_u8; 16usize];
32738        for v in &mut tmp {
32739            *v = buf.get_u8()?;
32740        }
32741        __struct.param_id = CharArray::new(tmp);
32742        let tmp = buf.get_u8()?;
32743        __struct.param_type =
32744            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32745                enum_type: "MavParamType",
32746                value: tmp as u64,
32747            })?;
32748        Ok(__struct)
32749    }
32750    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32751        let mut __tmp = BytesMut::new(bytes);
32752        #[allow(clippy::absurd_extreme_comparisons)]
32753        #[allow(unused_comparisons)]
32754        if __tmp.remaining() < Self::ENCODED_LEN {
32755            panic!(
32756                "buffer is too small (need {} bytes, but got {})",
32757                Self::ENCODED_LEN,
32758                __tmp.remaining(),
32759            )
32760        }
32761        __tmp.put_f32_le(self.param_value);
32762        __tmp.put_u8(self.target_system);
32763        __tmp.put_u8(self.target_component);
32764        for val in &self.param_id {
32765            __tmp.put_u8(*val);
32766        }
32767        __tmp.put_u8(self.param_type as u8);
32768        if matches!(version, MavlinkVersion::V2) {
32769            let len = __tmp.len();
32770            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32771        } else {
32772            __tmp.len()
32773        }
32774    }
32775}
32776#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
32777#[doc = ""]
32778#[doc = "ID: 22"]
32779#[derive(Debug, Clone, PartialEq)]
32780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32782#[cfg_attr(feature = "ts", derive(TS))]
32783#[cfg_attr(feature = "ts", ts(export))]
32784pub struct PARAM_VALUE_DATA {
32785    #[doc = "Onboard parameter value"]
32786    pub param_value: f32,
32787    #[doc = "Total number of onboard parameters"]
32788    pub param_count: u16,
32789    #[doc = "Index of this onboard parameter"]
32790    pub param_index: u16,
32791    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
32792    #[cfg_attr(feature = "ts", ts(type = "string"))]
32793    pub param_id: CharArray<16>,
32794    #[doc = "Onboard parameter type."]
32795    pub param_type: MavParamType,
32796}
32797impl PARAM_VALUE_DATA {
32798    pub const ENCODED_LEN: usize = 25usize;
32799    pub const DEFAULT: Self = Self {
32800        param_value: 0.0_f32,
32801        param_count: 0_u16,
32802        param_index: 0_u16,
32803        param_id: CharArray::new([0_u8; 16usize]),
32804        param_type: MavParamType::DEFAULT,
32805    };
32806    #[cfg(feature = "arbitrary")]
32807    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32808        use arbitrary::{Arbitrary, Unstructured};
32809        let mut buf = [0u8; 1024];
32810        rng.fill_bytes(&mut buf);
32811        let mut unstructured = Unstructured::new(&buf);
32812        Self::arbitrary(&mut unstructured).unwrap_or_default()
32813    }
32814}
32815impl Default for PARAM_VALUE_DATA {
32816    fn default() -> Self {
32817        Self::DEFAULT.clone()
32818    }
32819}
32820impl MessageData for PARAM_VALUE_DATA {
32821    type Message = MavMessage;
32822    const ID: u32 = 22u32;
32823    const NAME: &'static str = "PARAM_VALUE";
32824    const EXTRA_CRC: u8 = 220u8;
32825    const ENCODED_LEN: usize = 25usize;
32826    fn deser(
32827        _version: MavlinkVersion,
32828        __input: &[u8],
32829    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32830        let avail_len = __input.len();
32831        let mut payload_buf = [0; Self::ENCODED_LEN];
32832        let mut buf = if avail_len < Self::ENCODED_LEN {
32833            payload_buf[0..avail_len].copy_from_slice(__input);
32834            Bytes::new(&payload_buf)
32835        } else {
32836            Bytes::new(__input)
32837        };
32838        let mut __struct = Self::default();
32839        __struct.param_value = buf.get_f32_le()?;
32840        __struct.param_count = buf.get_u16_le()?;
32841        __struct.param_index = buf.get_u16_le()?;
32842        let mut tmp = [0_u8; 16usize];
32843        for v in &mut tmp {
32844            *v = buf.get_u8()?;
32845        }
32846        __struct.param_id = CharArray::new(tmp);
32847        let tmp = buf.get_u8()?;
32848        __struct.param_type =
32849            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32850                enum_type: "MavParamType",
32851                value: tmp as u64,
32852            })?;
32853        Ok(__struct)
32854    }
32855    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32856        let mut __tmp = BytesMut::new(bytes);
32857        #[allow(clippy::absurd_extreme_comparisons)]
32858        #[allow(unused_comparisons)]
32859        if __tmp.remaining() < Self::ENCODED_LEN {
32860            panic!(
32861                "buffer is too small (need {} bytes, but got {})",
32862                Self::ENCODED_LEN,
32863                __tmp.remaining(),
32864            )
32865        }
32866        __tmp.put_f32_le(self.param_value);
32867        __tmp.put_u16_le(self.param_count);
32868        __tmp.put_u16_le(self.param_index);
32869        for val in &self.param_id {
32870            __tmp.put_u8(*val);
32871        }
32872        __tmp.put_u8(self.param_type as u8);
32873        if matches!(version, MavlinkVersion::V2) {
32874            let len = __tmp.len();
32875            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32876        } else {
32877            __tmp.len()
32878        }
32879    }
32880}
32881#[doc = "PID tuning information."]
32882#[doc = ""]
32883#[doc = "ID: 194"]
32884#[derive(Debug, Clone, PartialEq)]
32885#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32886#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32887#[cfg_attr(feature = "ts", derive(TS))]
32888#[cfg_attr(feature = "ts", ts(export))]
32889pub struct PID_TUNING_DATA {
32890    #[doc = "Desired rate."]
32891    pub desired: f32,
32892    #[doc = "Achieved rate."]
32893    pub achieved: f32,
32894    #[doc = "FF component."]
32895    pub FF: f32,
32896    #[doc = "P component."]
32897    pub P: f32,
32898    #[doc = "I component."]
32899    pub I: f32,
32900    #[doc = "D component."]
32901    pub D: f32,
32902    #[doc = "Axis."]
32903    pub axis: PidTuningAxis,
32904    #[doc = "Slew rate."]
32905    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32906    pub SRate: f32,
32907    #[doc = "P/D oscillation modifier."]
32908    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32909    pub PDmod: f32,
32910}
32911impl PID_TUNING_DATA {
32912    pub const ENCODED_LEN: usize = 33usize;
32913    pub const DEFAULT: Self = Self {
32914        desired: 0.0_f32,
32915        achieved: 0.0_f32,
32916        FF: 0.0_f32,
32917        P: 0.0_f32,
32918        I: 0.0_f32,
32919        D: 0.0_f32,
32920        axis: PidTuningAxis::DEFAULT,
32921        SRate: 0.0_f32,
32922        PDmod: 0.0_f32,
32923    };
32924    #[cfg(feature = "arbitrary")]
32925    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32926        use arbitrary::{Arbitrary, Unstructured};
32927        let mut buf = [0u8; 1024];
32928        rng.fill_bytes(&mut buf);
32929        let mut unstructured = Unstructured::new(&buf);
32930        Self::arbitrary(&mut unstructured).unwrap_or_default()
32931    }
32932}
32933impl Default for PID_TUNING_DATA {
32934    fn default() -> Self {
32935        Self::DEFAULT.clone()
32936    }
32937}
32938impl MessageData for PID_TUNING_DATA {
32939    type Message = MavMessage;
32940    const ID: u32 = 194u32;
32941    const NAME: &'static str = "PID_TUNING";
32942    const EXTRA_CRC: u8 = 98u8;
32943    const ENCODED_LEN: usize = 33usize;
32944    fn deser(
32945        _version: MavlinkVersion,
32946        __input: &[u8],
32947    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32948        let avail_len = __input.len();
32949        let mut payload_buf = [0; Self::ENCODED_LEN];
32950        let mut buf = if avail_len < Self::ENCODED_LEN {
32951            payload_buf[0..avail_len].copy_from_slice(__input);
32952            Bytes::new(&payload_buf)
32953        } else {
32954            Bytes::new(__input)
32955        };
32956        let mut __struct = Self::default();
32957        __struct.desired = buf.get_f32_le()?;
32958        __struct.achieved = buf.get_f32_le()?;
32959        __struct.FF = buf.get_f32_le()?;
32960        __struct.P = buf.get_f32_le()?;
32961        __struct.I = buf.get_f32_le()?;
32962        __struct.D = buf.get_f32_le()?;
32963        let tmp = buf.get_u8()?;
32964        __struct.axis =
32965            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32966                enum_type: "PidTuningAxis",
32967                value: tmp as u64,
32968            })?;
32969        __struct.SRate = buf.get_f32_le()?;
32970        __struct.PDmod = buf.get_f32_le()?;
32971        Ok(__struct)
32972    }
32973    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32974        let mut __tmp = BytesMut::new(bytes);
32975        #[allow(clippy::absurd_extreme_comparisons)]
32976        #[allow(unused_comparisons)]
32977        if __tmp.remaining() < Self::ENCODED_LEN {
32978            panic!(
32979                "buffer is too small (need {} bytes, but got {})",
32980                Self::ENCODED_LEN,
32981                __tmp.remaining(),
32982            )
32983        }
32984        __tmp.put_f32_le(self.desired);
32985        __tmp.put_f32_le(self.achieved);
32986        __tmp.put_f32_le(self.FF);
32987        __tmp.put_f32_le(self.P);
32988        __tmp.put_f32_le(self.I);
32989        __tmp.put_f32_le(self.D);
32990        __tmp.put_u8(self.axis as u8);
32991        if matches!(version, MavlinkVersion::V2) {
32992            __tmp.put_f32_le(self.SRate);
32993            __tmp.put_f32_le(self.PDmod);
32994            let len = __tmp.len();
32995            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32996        } else {
32997            __tmp.len()
32998        }
32999    }
33000}
33001#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33002#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33003#[doc = ""]
33004#[doc = "ID: 4"]
33005#[derive(Debug, Clone, PartialEq)]
33006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33008#[cfg_attr(feature = "ts", derive(TS))]
33009#[cfg_attr(feature = "ts", ts(export))]
33010pub struct PING_DATA {
33011    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33012    pub time_usec: u64,
33013    #[doc = "PING sequence"]
33014    pub seq: u32,
33015    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
33016    pub target_system: u8,
33017    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
33018    pub target_component: u8,
33019}
33020impl PING_DATA {
33021    pub const ENCODED_LEN: usize = 14usize;
33022    pub const DEFAULT: Self = Self {
33023        time_usec: 0_u64,
33024        seq: 0_u32,
33025        target_system: 0_u8,
33026        target_component: 0_u8,
33027    };
33028    #[cfg(feature = "arbitrary")]
33029    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33030        use arbitrary::{Arbitrary, Unstructured};
33031        let mut buf = [0u8; 1024];
33032        rng.fill_bytes(&mut buf);
33033        let mut unstructured = Unstructured::new(&buf);
33034        Self::arbitrary(&mut unstructured).unwrap_or_default()
33035    }
33036}
33037impl Default for PING_DATA {
33038    fn default() -> Self {
33039        Self::DEFAULT.clone()
33040    }
33041}
33042impl MessageData for PING_DATA {
33043    type Message = MavMessage;
33044    const ID: u32 = 4u32;
33045    const NAME: &'static str = "PING";
33046    const EXTRA_CRC: u8 = 237u8;
33047    const ENCODED_LEN: usize = 14usize;
33048    fn deser(
33049        _version: MavlinkVersion,
33050        __input: &[u8],
33051    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33052        let avail_len = __input.len();
33053        let mut payload_buf = [0; Self::ENCODED_LEN];
33054        let mut buf = if avail_len < Self::ENCODED_LEN {
33055            payload_buf[0..avail_len].copy_from_slice(__input);
33056            Bytes::new(&payload_buf)
33057        } else {
33058            Bytes::new(__input)
33059        };
33060        let mut __struct = Self::default();
33061        __struct.time_usec = buf.get_u64_le()?;
33062        __struct.seq = buf.get_u32_le()?;
33063        __struct.target_system = buf.get_u8()?;
33064        __struct.target_component = buf.get_u8()?;
33065        Ok(__struct)
33066    }
33067    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33068        let mut __tmp = BytesMut::new(bytes);
33069        #[allow(clippy::absurd_extreme_comparisons)]
33070        #[allow(unused_comparisons)]
33071        if __tmp.remaining() < Self::ENCODED_LEN {
33072            panic!(
33073                "buffer is too small (need {} bytes, but got {})",
33074                Self::ENCODED_LEN,
33075                __tmp.remaining(),
33076            )
33077        }
33078        __tmp.put_u64_le(self.time_usec);
33079        __tmp.put_u32_le(self.seq);
33080        __tmp.put_u8(self.target_system);
33081        __tmp.put_u8(self.target_component);
33082        if matches!(version, MavlinkVersion::V2) {
33083            let len = __tmp.len();
33084            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33085        } else {
33086            __tmp.len()
33087        }
33088    }
33089}
33090#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33091#[doc = "Control vehicle tone generation (buzzer)."]
33092#[doc = ""]
33093#[doc = "ID: 258"]
33094#[derive(Debug, Clone, PartialEq)]
33095#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33096#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33097#[cfg_attr(feature = "ts", derive(TS))]
33098#[cfg_attr(feature = "ts", ts(export))]
33099pub struct PLAY_TUNE_DATA {
33100    #[doc = "System ID"]
33101    pub target_system: u8,
33102    #[doc = "Component ID"]
33103    pub target_component: u8,
33104    #[doc = "tune in board specific format"]
33105    #[cfg_attr(feature = "ts", ts(type = "string"))]
33106    pub tune: CharArray<30>,
33107    #[doc = "tune extension (appended to tune)"]
33108    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33109    #[cfg_attr(feature = "ts", ts(type = "string"))]
33110    pub tune2: CharArray<200>,
33111}
33112impl PLAY_TUNE_DATA {
33113    pub const ENCODED_LEN: usize = 232usize;
33114    pub const DEFAULT: Self = Self {
33115        target_system: 0_u8,
33116        target_component: 0_u8,
33117        tune: CharArray::new([0_u8; 30usize]),
33118        tune2: CharArray::new([0_u8; 200usize]),
33119    };
33120    #[cfg(feature = "arbitrary")]
33121    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33122        use arbitrary::{Arbitrary, Unstructured};
33123        let mut buf = [0u8; 1024];
33124        rng.fill_bytes(&mut buf);
33125        let mut unstructured = Unstructured::new(&buf);
33126        Self::arbitrary(&mut unstructured).unwrap_or_default()
33127    }
33128}
33129impl Default for PLAY_TUNE_DATA {
33130    fn default() -> Self {
33131        Self::DEFAULT.clone()
33132    }
33133}
33134impl MessageData for PLAY_TUNE_DATA {
33135    type Message = MavMessage;
33136    const ID: u32 = 258u32;
33137    const NAME: &'static str = "PLAY_TUNE";
33138    const EXTRA_CRC: u8 = 187u8;
33139    const ENCODED_LEN: usize = 232usize;
33140    fn deser(
33141        _version: MavlinkVersion,
33142        __input: &[u8],
33143    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33144        let avail_len = __input.len();
33145        let mut payload_buf = [0; Self::ENCODED_LEN];
33146        let mut buf = if avail_len < Self::ENCODED_LEN {
33147            payload_buf[0..avail_len].copy_from_slice(__input);
33148            Bytes::new(&payload_buf)
33149        } else {
33150            Bytes::new(__input)
33151        };
33152        let mut __struct = Self::default();
33153        __struct.target_system = buf.get_u8()?;
33154        __struct.target_component = buf.get_u8()?;
33155        let mut tmp = [0_u8; 30usize];
33156        for v in &mut tmp {
33157            *v = buf.get_u8()?;
33158        }
33159        __struct.tune = CharArray::new(tmp);
33160        let mut tmp = [0_u8; 200usize];
33161        for v in &mut tmp {
33162            *v = buf.get_u8()?;
33163        }
33164        __struct.tune2 = CharArray::new(tmp);
33165        Ok(__struct)
33166    }
33167    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33168        let mut __tmp = BytesMut::new(bytes);
33169        #[allow(clippy::absurd_extreme_comparisons)]
33170        #[allow(unused_comparisons)]
33171        if __tmp.remaining() < Self::ENCODED_LEN {
33172            panic!(
33173                "buffer is too small (need {} bytes, but got {})",
33174                Self::ENCODED_LEN,
33175                __tmp.remaining(),
33176            )
33177        }
33178        __tmp.put_u8(self.target_system);
33179        __tmp.put_u8(self.target_component);
33180        for val in &self.tune {
33181            __tmp.put_u8(*val);
33182        }
33183        if matches!(version, MavlinkVersion::V2) {
33184            for val in &self.tune2 {
33185                __tmp.put_u8(*val);
33186            }
33187            let len = __tmp.len();
33188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33189        } else {
33190            __tmp.len()
33191        }
33192    }
33193}
33194#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33195#[doc = ""]
33196#[doc = "ID: 400"]
33197#[derive(Debug, Clone, PartialEq)]
33198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33200#[cfg_attr(feature = "ts", derive(TS))]
33201#[cfg_attr(feature = "ts", ts(export))]
33202pub struct PLAY_TUNE_V2_DATA {
33203    #[doc = "Tune format"]
33204    pub format: TuneFormat,
33205    #[doc = "System ID"]
33206    pub target_system: u8,
33207    #[doc = "Component ID"]
33208    pub target_component: u8,
33209    #[doc = "Tune definition as a NULL-terminated string."]
33210    #[cfg_attr(feature = "ts", ts(type = "string"))]
33211    pub tune: CharArray<248>,
33212}
33213impl PLAY_TUNE_V2_DATA {
33214    pub const ENCODED_LEN: usize = 254usize;
33215    pub const DEFAULT: Self = Self {
33216        format: TuneFormat::DEFAULT,
33217        target_system: 0_u8,
33218        target_component: 0_u8,
33219        tune: CharArray::new([0_u8; 248usize]),
33220    };
33221    #[cfg(feature = "arbitrary")]
33222    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33223        use arbitrary::{Arbitrary, Unstructured};
33224        let mut buf = [0u8; 1024];
33225        rng.fill_bytes(&mut buf);
33226        let mut unstructured = Unstructured::new(&buf);
33227        Self::arbitrary(&mut unstructured).unwrap_or_default()
33228    }
33229}
33230impl Default for PLAY_TUNE_V2_DATA {
33231    fn default() -> Self {
33232        Self::DEFAULT.clone()
33233    }
33234}
33235impl MessageData for PLAY_TUNE_V2_DATA {
33236    type Message = MavMessage;
33237    const ID: u32 = 400u32;
33238    const NAME: &'static str = "PLAY_TUNE_V2";
33239    const EXTRA_CRC: u8 = 110u8;
33240    const ENCODED_LEN: usize = 254usize;
33241    fn deser(
33242        _version: MavlinkVersion,
33243        __input: &[u8],
33244    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33245        let avail_len = __input.len();
33246        let mut payload_buf = [0; Self::ENCODED_LEN];
33247        let mut buf = if avail_len < Self::ENCODED_LEN {
33248            payload_buf[0..avail_len].copy_from_slice(__input);
33249            Bytes::new(&payload_buf)
33250        } else {
33251            Bytes::new(__input)
33252        };
33253        let mut __struct = Self::default();
33254        let tmp = buf.get_u32_le()?;
33255        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
33256            ::mavlink_core::error::ParserError::InvalidEnum {
33257                enum_type: "TuneFormat",
33258                value: tmp as u64,
33259            },
33260        )?;
33261        __struct.target_system = buf.get_u8()?;
33262        __struct.target_component = buf.get_u8()?;
33263        let mut tmp = [0_u8; 248usize];
33264        for v in &mut tmp {
33265            *v = buf.get_u8()?;
33266        }
33267        __struct.tune = CharArray::new(tmp);
33268        Ok(__struct)
33269    }
33270    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33271        let mut __tmp = BytesMut::new(bytes);
33272        #[allow(clippy::absurd_extreme_comparisons)]
33273        #[allow(unused_comparisons)]
33274        if __tmp.remaining() < Self::ENCODED_LEN {
33275            panic!(
33276                "buffer is too small (need {} bytes, but got {})",
33277                Self::ENCODED_LEN,
33278                __tmp.remaining(),
33279            )
33280        }
33281        __tmp.put_u32_le(self.format as u32);
33282        __tmp.put_u8(self.target_system);
33283        __tmp.put_u8(self.target_component);
33284        for val in &self.tune {
33285            __tmp.put_u8(*val);
33286        }
33287        if matches!(version, MavlinkVersion::V2) {
33288            let len = __tmp.len();
33289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33290        } else {
33291            __tmp.len()
33292        }
33293    }
33294}
33295#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33296#[doc = ""]
33297#[doc = "ID: 87"]
33298#[derive(Debug, Clone, PartialEq)]
33299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33301#[cfg_attr(feature = "ts", derive(TS))]
33302#[cfg_attr(feature = "ts", ts(export))]
33303pub struct POSITION_TARGET_GLOBAL_INT_DATA {
33304    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
33305    pub time_boot_ms: u32,
33306    #[doc = "Latitude in WGS84 frame"]
33307    pub lat_int: i32,
33308    #[doc = "Longitude in WGS84 frame"]
33309    pub lon_int: i32,
33310    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
33311    pub alt: f32,
33312    #[doc = "X velocity in NED frame"]
33313    pub vx: f32,
33314    #[doc = "Y velocity in NED frame"]
33315    pub vy: f32,
33316    #[doc = "Z velocity in NED frame"]
33317    pub vz: f32,
33318    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
33319    pub afx: f32,
33320    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
33321    pub afy: f32,
33322    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
33323    pub afz: f32,
33324    #[doc = "yaw setpoint"]
33325    pub yaw: f32,
33326    #[doc = "yaw rate setpoint"]
33327    pub yaw_rate: f32,
33328    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
33329    pub type_mask: PositionTargetTypemask,
33330    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
33331    pub coordinate_frame: MavFrame,
33332}
33333impl POSITION_TARGET_GLOBAL_INT_DATA {
33334    pub const ENCODED_LEN: usize = 51usize;
33335    pub const DEFAULT: Self = Self {
33336        time_boot_ms: 0_u32,
33337        lat_int: 0_i32,
33338        lon_int: 0_i32,
33339        alt: 0.0_f32,
33340        vx: 0.0_f32,
33341        vy: 0.0_f32,
33342        vz: 0.0_f32,
33343        afx: 0.0_f32,
33344        afy: 0.0_f32,
33345        afz: 0.0_f32,
33346        yaw: 0.0_f32,
33347        yaw_rate: 0.0_f32,
33348        type_mask: PositionTargetTypemask::DEFAULT,
33349        coordinate_frame: MavFrame::DEFAULT,
33350    };
33351    #[cfg(feature = "arbitrary")]
33352    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33353        use arbitrary::{Arbitrary, Unstructured};
33354        let mut buf = [0u8; 1024];
33355        rng.fill_bytes(&mut buf);
33356        let mut unstructured = Unstructured::new(&buf);
33357        Self::arbitrary(&mut unstructured).unwrap_or_default()
33358    }
33359}
33360impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
33361    fn default() -> Self {
33362        Self::DEFAULT.clone()
33363    }
33364}
33365impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
33366    type Message = MavMessage;
33367    const ID: u32 = 87u32;
33368    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
33369    const EXTRA_CRC: u8 = 150u8;
33370    const ENCODED_LEN: usize = 51usize;
33371    fn deser(
33372        _version: MavlinkVersion,
33373        __input: &[u8],
33374    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33375        let avail_len = __input.len();
33376        let mut payload_buf = [0; Self::ENCODED_LEN];
33377        let mut buf = if avail_len < Self::ENCODED_LEN {
33378            payload_buf[0..avail_len].copy_from_slice(__input);
33379            Bytes::new(&payload_buf)
33380        } else {
33381            Bytes::new(__input)
33382        };
33383        let mut __struct = Self::default();
33384        __struct.time_boot_ms = buf.get_u32_le()?;
33385        __struct.lat_int = buf.get_i32_le()?;
33386        __struct.lon_int = buf.get_i32_le()?;
33387        __struct.alt = buf.get_f32_le()?;
33388        __struct.vx = buf.get_f32_le()?;
33389        __struct.vy = buf.get_f32_le()?;
33390        __struct.vz = buf.get_f32_le()?;
33391        __struct.afx = buf.get_f32_le()?;
33392        __struct.afy = buf.get_f32_le()?;
33393        __struct.afz = buf.get_f32_le()?;
33394        __struct.yaw = buf.get_f32_le()?;
33395        __struct.yaw_rate = buf.get_f32_le()?;
33396        let tmp = buf.get_u16_le()?;
33397        __struct.type_mask =
33398            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
33399                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33400                    flag_type: "PositionTargetTypemask",
33401                    value: tmp as u64,
33402                })?;
33403        let tmp = buf.get_u8()?;
33404        __struct.coordinate_frame =
33405            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33406                enum_type: "MavFrame",
33407                value: tmp as u64,
33408            })?;
33409        Ok(__struct)
33410    }
33411    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33412        let mut __tmp = BytesMut::new(bytes);
33413        #[allow(clippy::absurd_extreme_comparisons)]
33414        #[allow(unused_comparisons)]
33415        if __tmp.remaining() < Self::ENCODED_LEN {
33416            panic!(
33417                "buffer is too small (need {} bytes, but got {})",
33418                Self::ENCODED_LEN,
33419                __tmp.remaining(),
33420            )
33421        }
33422        __tmp.put_u32_le(self.time_boot_ms);
33423        __tmp.put_i32_le(self.lat_int);
33424        __tmp.put_i32_le(self.lon_int);
33425        __tmp.put_f32_le(self.alt);
33426        __tmp.put_f32_le(self.vx);
33427        __tmp.put_f32_le(self.vy);
33428        __tmp.put_f32_le(self.vz);
33429        __tmp.put_f32_le(self.afx);
33430        __tmp.put_f32_le(self.afy);
33431        __tmp.put_f32_le(self.afz);
33432        __tmp.put_f32_le(self.yaw);
33433        __tmp.put_f32_le(self.yaw_rate);
33434        __tmp.put_u16_le(self.type_mask.bits() as u16);
33435        __tmp.put_u8(self.coordinate_frame as u8);
33436        if matches!(version, MavlinkVersion::V2) {
33437            let len = __tmp.len();
33438            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33439        } else {
33440            __tmp.len()
33441        }
33442    }
33443}
33444#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33445#[doc = ""]
33446#[doc = "ID: 85"]
33447#[derive(Debug, Clone, PartialEq)]
33448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33450#[cfg_attr(feature = "ts", derive(TS))]
33451#[cfg_attr(feature = "ts", ts(export))]
33452pub struct POSITION_TARGET_LOCAL_NED_DATA {
33453    #[doc = "Timestamp (time since system boot)."]
33454    pub time_boot_ms: u32,
33455    #[doc = "X Position in NED frame"]
33456    pub x: f32,
33457    #[doc = "Y Position in NED frame"]
33458    pub y: f32,
33459    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
33460    pub z: f32,
33461    #[doc = "X velocity in NED frame"]
33462    pub vx: f32,
33463    #[doc = "Y velocity in NED frame"]
33464    pub vy: f32,
33465    #[doc = "Z velocity in NED frame"]
33466    pub vz: f32,
33467    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
33468    pub afx: f32,
33469    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
33470    pub afy: f32,
33471    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
33472    pub afz: f32,
33473    #[doc = "yaw setpoint"]
33474    pub yaw: f32,
33475    #[doc = "yaw rate setpoint"]
33476    pub yaw_rate: f32,
33477    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
33478    pub type_mask: PositionTargetTypemask,
33479    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
33480    pub coordinate_frame: MavFrame,
33481}
33482impl POSITION_TARGET_LOCAL_NED_DATA {
33483    pub const ENCODED_LEN: usize = 51usize;
33484    pub const DEFAULT: Self = Self {
33485        time_boot_ms: 0_u32,
33486        x: 0.0_f32,
33487        y: 0.0_f32,
33488        z: 0.0_f32,
33489        vx: 0.0_f32,
33490        vy: 0.0_f32,
33491        vz: 0.0_f32,
33492        afx: 0.0_f32,
33493        afy: 0.0_f32,
33494        afz: 0.0_f32,
33495        yaw: 0.0_f32,
33496        yaw_rate: 0.0_f32,
33497        type_mask: PositionTargetTypemask::DEFAULT,
33498        coordinate_frame: MavFrame::DEFAULT,
33499    };
33500    #[cfg(feature = "arbitrary")]
33501    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33502        use arbitrary::{Arbitrary, Unstructured};
33503        let mut buf = [0u8; 1024];
33504        rng.fill_bytes(&mut buf);
33505        let mut unstructured = Unstructured::new(&buf);
33506        Self::arbitrary(&mut unstructured).unwrap_or_default()
33507    }
33508}
33509impl Default for POSITION_TARGET_LOCAL_NED_DATA {
33510    fn default() -> Self {
33511        Self::DEFAULT.clone()
33512    }
33513}
33514impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
33515    type Message = MavMessage;
33516    const ID: u32 = 85u32;
33517    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
33518    const EXTRA_CRC: u8 = 140u8;
33519    const ENCODED_LEN: usize = 51usize;
33520    fn deser(
33521        _version: MavlinkVersion,
33522        __input: &[u8],
33523    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33524        let avail_len = __input.len();
33525        let mut payload_buf = [0; Self::ENCODED_LEN];
33526        let mut buf = if avail_len < Self::ENCODED_LEN {
33527            payload_buf[0..avail_len].copy_from_slice(__input);
33528            Bytes::new(&payload_buf)
33529        } else {
33530            Bytes::new(__input)
33531        };
33532        let mut __struct = Self::default();
33533        __struct.time_boot_ms = buf.get_u32_le()?;
33534        __struct.x = buf.get_f32_le()?;
33535        __struct.y = buf.get_f32_le()?;
33536        __struct.z = buf.get_f32_le()?;
33537        __struct.vx = buf.get_f32_le()?;
33538        __struct.vy = buf.get_f32_le()?;
33539        __struct.vz = buf.get_f32_le()?;
33540        __struct.afx = buf.get_f32_le()?;
33541        __struct.afy = buf.get_f32_le()?;
33542        __struct.afz = buf.get_f32_le()?;
33543        __struct.yaw = buf.get_f32_le()?;
33544        __struct.yaw_rate = buf.get_f32_le()?;
33545        let tmp = buf.get_u16_le()?;
33546        __struct.type_mask =
33547            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
33548                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33549                    flag_type: "PositionTargetTypemask",
33550                    value: tmp as u64,
33551                })?;
33552        let tmp = buf.get_u8()?;
33553        __struct.coordinate_frame =
33554            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33555                enum_type: "MavFrame",
33556                value: tmp as u64,
33557            })?;
33558        Ok(__struct)
33559    }
33560    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33561        let mut __tmp = BytesMut::new(bytes);
33562        #[allow(clippy::absurd_extreme_comparisons)]
33563        #[allow(unused_comparisons)]
33564        if __tmp.remaining() < Self::ENCODED_LEN {
33565            panic!(
33566                "buffer is too small (need {} bytes, but got {})",
33567                Self::ENCODED_LEN,
33568                __tmp.remaining(),
33569            )
33570        }
33571        __tmp.put_u32_le(self.time_boot_ms);
33572        __tmp.put_f32_le(self.x);
33573        __tmp.put_f32_le(self.y);
33574        __tmp.put_f32_le(self.z);
33575        __tmp.put_f32_le(self.vx);
33576        __tmp.put_f32_le(self.vy);
33577        __tmp.put_f32_le(self.vz);
33578        __tmp.put_f32_le(self.afx);
33579        __tmp.put_f32_le(self.afy);
33580        __tmp.put_f32_le(self.afz);
33581        __tmp.put_f32_le(self.yaw);
33582        __tmp.put_f32_le(self.yaw_rate);
33583        __tmp.put_u16_le(self.type_mask.bits() as u16);
33584        __tmp.put_u8(self.coordinate_frame as u8);
33585        if matches!(version, MavlinkVersion::V2) {
33586            let len = __tmp.len();
33587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33588        } else {
33589            __tmp.len()
33590        }
33591    }
33592}
33593#[doc = "Power supply status."]
33594#[doc = ""]
33595#[doc = "ID: 125"]
33596#[derive(Debug, Clone, PartialEq)]
33597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33599#[cfg_attr(feature = "ts", derive(TS))]
33600#[cfg_attr(feature = "ts", ts(export))]
33601pub struct POWER_STATUS_DATA {
33602    #[doc = "5V rail voltage."]
33603    pub Vcc: u16,
33604    #[doc = "Servo rail voltage."]
33605    pub Vservo: u16,
33606    #[doc = "Bitmap of power supply status flags."]
33607    pub flags: MavPowerStatus,
33608}
33609impl POWER_STATUS_DATA {
33610    pub const ENCODED_LEN: usize = 6usize;
33611    pub const DEFAULT: Self = Self {
33612        Vcc: 0_u16,
33613        Vservo: 0_u16,
33614        flags: MavPowerStatus::DEFAULT,
33615    };
33616    #[cfg(feature = "arbitrary")]
33617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33618        use arbitrary::{Arbitrary, Unstructured};
33619        let mut buf = [0u8; 1024];
33620        rng.fill_bytes(&mut buf);
33621        let mut unstructured = Unstructured::new(&buf);
33622        Self::arbitrary(&mut unstructured).unwrap_or_default()
33623    }
33624}
33625impl Default for POWER_STATUS_DATA {
33626    fn default() -> Self {
33627        Self::DEFAULT.clone()
33628    }
33629}
33630impl MessageData for POWER_STATUS_DATA {
33631    type Message = MavMessage;
33632    const ID: u32 = 125u32;
33633    const NAME: &'static str = "POWER_STATUS";
33634    const EXTRA_CRC: u8 = 203u8;
33635    const ENCODED_LEN: usize = 6usize;
33636    fn deser(
33637        _version: MavlinkVersion,
33638        __input: &[u8],
33639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33640        let avail_len = __input.len();
33641        let mut payload_buf = [0; Self::ENCODED_LEN];
33642        let mut buf = if avail_len < Self::ENCODED_LEN {
33643            payload_buf[0..avail_len].copy_from_slice(__input);
33644            Bytes::new(&payload_buf)
33645        } else {
33646            Bytes::new(__input)
33647        };
33648        let mut __struct = Self::default();
33649        __struct.Vcc = buf.get_u16_le()?;
33650        __struct.Vservo = buf.get_u16_le()?;
33651        let tmp = buf.get_u16_le()?;
33652        __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
33653            ::mavlink_core::error::ParserError::InvalidFlag {
33654                flag_type: "MavPowerStatus",
33655                value: tmp as u64,
33656            },
33657        )?;
33658        Ok(__struct)
33659    }
33660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33661        let mut __tmp = BytesMut::new(bytes);
33662        #[allow(clippy::absurd_extreme_comparisons)]
33663        #[allow(unused_comparisons)]
33664        if __tmp.remaining() < Self::ENCODED_LEN {
33665            panic!(
33666                "buffer is too small (need {} bytes, but got {})",
33667                Self::ENCODED_LEN,
33668                __tmp.remaining(),
33669            )
33670        }
33671        __tmp.put_u16_le(self.Vcc);
33672        __tmp.put_u16_le(self.Vservo);
33673        __tmp.put_u16_le(self.flags.bits() as u16);
33674        if matches!(version, MavlinkVersion::V2) {
33675            let len = __tmp.len();
33676            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33677        } else {
33678            __tmp.len()
33679        }
33680    }
33681}
33682#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33683#[doc = ""]
33684#[doc = "ID: 300"]
33685#[derive(Debug, Clone, PartialEq)]
33686#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33688#[cfg_attr(feature = "ts", derive(TS))]
33689#[cfg_attr(feature = "ts", ts(export))]
33690pub struct PROTOCOL_VERSION_DATA {
33691    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
33692    pub version: u16,
33693    #[doc = "Minimum MAVLink version supported"]
33694    pub min_version: u16,
33695    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
33696    pub max_version: u16,
33697    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
33698    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33699    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33700    pub spec_version_hash: [u8; 8],
33701    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
33702    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33703    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33704    pub library_version_hash: [u8; 8],
33705}
33706impl PROTOCOL_VERSION_DATA {
33707    pub const ENCODED_LEN: usize = 22usize;
33708    pub const DEFAULT: Self = Self {
33709        version: 0_u16,
33710        min_version: 0_u16,
33711        max_version: 0_u16,
33712        spec_version_hash: [0_u8; 8usize],
33713        library_version_hash: [0_u8; 8usize],
33714    };
33715    #[cfg(feature = "arbitrary")]
33716    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33717        use arbitrary::{Arbitrary, Unstructured};
33718        let mut buf = [0u8; 1024];
33719        rng.fill_bytes(&mut buf);
33720        let mut unstructured = Unstructured::new(&buf);
33721        Self::arbitrary(&mut unstructured).unwrap_or_default()
33722    }
33723}
33724impl Default for PROTOCOL_VERSION_DATA {
33725    fn default() -> Self {
33726        Self::DEFAULT.clone()
33727    }
33728}
33729impl MessageData for PROTOCOL_VERSION_DATA {
33730    type Message = MavMessage;
33731    const ID: u32 = 300u32;
33732    const NAME: &'static str = "PROTOCOL_VERSION";
33733    const EXTRA_CRC: u8 = 217u8;
33734    const ENCODED_LEN: usize = 22usize;
33735    fn deser(
33736        _version: MavlinkVersion,
33737        __input: &[u8],
33738    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33739        let avail_len = __input.len();
33740        let mut payload_buf = [0; Self::ENCODED_LEN];
33741        let mut buf = if avail_len < Self::ENCODED_LEN {
33742            payload_buf[0..avail_len].copy_from_slice(__input);
33743            Bytes::new(&payload_buf)
33744        } else {
33745            Bytes::new(__input)
33746        };
33747        let mut __struct = Self::default();
33748        __struct.version = buf.get_u16_le()?;
33749        __struct.min_version = buf.get_u16_le()?;
33750        __struct.max_version = buf.get_u16_le()?;
33751        for v in &mut __struct.spec_version_hash {
33752            let val = buf.get_u8()?;
33753            *v = val;
33754        }
33755        for v in &mut __struct.library_version_hash {
33756            let val = buf.get_u8()?;
33757            *v = val;
33758        }
33759        Ok(__struct)
33760    }
33761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33762        let mut __tmp = BytesMut::new(bytes);
33763        #[allow(clippy::absurd_extreme_comparisons)]
33764        #[allow(unused_comparisons)]
33765        if __tmp.remaining() < Self::ENCODED_LEN {
33766            panic!(
33767                "buffer is too small (need {} bytes, but got {})",
33768                Self::ENCODED_LEN,
33769                __tmp.remaining(),
33770            )
33771        }
33772        __tmp.put_u16_le(self.version);
33773        __tmp.put_u16_le(self.min_version);
33774        __tmp.put_u16_le(self.max_version);
33775        for val in &self.spec_version_hash {
33776            __tmp.put_u8(*val);
33777        }
33778        for val in &self.library_version_hash {
33779            __tmp.put_u8(*val);
33780        }
33781        if matches!(version, MavlinkVersion::V2) {
33782            let len = __tmp.len();
33783            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33784        } else {
33785            __tmp.len()
33786        }
33787    }
33788}
33789#[doc = "Status generated by radio."]
33790#[doc = ""]
33791#[doc = "ID: 166"]
33792#[derive(Debug, Clone, PartialEq)]
33793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33795#[cfg_attr(feature = "ts", derive(TS))]
33796#[cfg_attr(feature = "ts", ts(export))]
33797pub struct RADIO_DATA {
33798    #[doc = "Receive errors."]
33799    pub rxerrors: u16,
33800    #[doc = "Count of error corrected packets."]
33801    pub fixed: u16,
33802    #[doc = "Local signal strength."]
33803    pub rssi: u8,
33804    #[doc = "Remote signal strength."]
33805    pub remrssi: u8,
33806    #[doc = "How full the tx buffer is."]
33807    pub txbuf: u8,
33808    #[doc = "Background noise level."]
33809    pub noise: u8,
33810    #[doc = "Remote background noise level."]
33811    pub remnoise: u8,
33812}
33813impl RADIO_DATA {
33814    pub const ENCODED_LEN: usize = 9usize;
33815    pub const DEFAULT: Self = Self {
33816        rxerrors: 0_u16,
33817        fixed: 0_u16,
33818        rssi: 0_u8,
33819        remrssi: 0_u8,
33820        txbuf: 0_u8,
33821        noise: 0_u8,
33822        remnoise: 0_u8,
33823    };
33824    #[cfg(feature = "arbitrary")]
33825    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33826        use arbitrary::{Arbitrary, Unstructured};
33827        let mut buf = [0u8; 1024];
33828        rng.fill_bytes(&mut buf);
33829        let mut unstructured = Unstructured::new(&buf);
33830        Self::arbitrary(&mut unstructured).unwrap_or_default()
33831    }
33832}
33833impl Default for RADIO_DATA {
33834    fn default() -> Self {
33835        Self::DEFAULT.clone()
33836    }
33837}
33838impl MessageData for RADIO_DATA {
33839    type Message = MavMessage;
33840    const ID: u32 = 166u32;
33841    const NAME: &'static str = "RADIO";
33842    const EXTRA_CRC: u8 = 21u8;
33843    const ENCODED_LEN: usize = 9usize;
33844    fn deser(
33845        _version: MavlinkVersion,
33846        __input: &[u8],
33847    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33848        let avail_len = __input.len();
33849        let mut payload_buf = [0; Self::ENCODED_LEN];
33850        let mut buf = if avail_len < Self::ENCODED_LEN {
33851            payload_buf[0..avail_len].copy_from_slice(__input);
33852            Bytes::new(&payload_buf)
33853        } else {
33854            Bytes::new(__input)
33855        };
33856        let mut __struct = Self::default();
33857        __struct.rxerrors = buf.get_u16_le()?;
33858        __struct.fixed = buf.get_u16_le()?;
33859        __struct.rssi = buf.get_u8()?;
33860        __struct.remrssi = buf.get_u8()?;
33861        __struct.txbuf = buf.get_u8()?;
33862        __struct.noise = buf.get_u8()?;
33863        __struct.remnoise = buf.get_u8()?;
33864        Ok(__struct)
33865    }
33866    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33867        let mut __tmp = BytesMut::new(bytes);
33868        #[allow(clippy::absurd_extreme_comparisons)]
33869        #[allow(unused_comparisons)]
33870        if __tmp.remaining() < Self::ENCODED_LEN {
33871            panic!(
33872                "buffer is too small (need {} bytes, but got {})",
33873                Self::ENCODED_LEN,
33874                __tmp.remaining(),
33875            )
33876        }
33877        __tmp.put_u16_le(self.rxerrors);
33878        __tmp.put_u16_le(self.fixed);
33879        __tmp.put_u8(self.rssi);
33880        __tmp.put_u8(self.remrssi);
33881        __tmp.put_u8(self.txbuf);
33882        __tmp.put_u8(self.noise);
33883        __tmp.put_u8(self.remnoise);
33884        if matches!(version, MavlinkVersion::V2) {
33885            let len = __tmp.len();
33886            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33887        } else {
33888            __tmp.len()
33889        }
33890    }
33891}
33892#[doc = "Status generated by radio and injected into MAVLink stream."]
33893#[doc = ""]
33894#[doc = "ID: 109"]
33895#[derive(Debug, Clone, PartialEq)]
33896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33898#[cfg_attr(feature = "ts", derive(TS))]
33899#[cfg_attr(feature = "ts", ts(export))]
33900pub struct RADIO_STATUS_DATA {
33901    #[doc = "Count of radio packet receive errors (since boot)."]
33902    pub rxerrors: u16,
33903    #[doc = "Count of error corrected radio packets (since boot)."]
33904    pub fixed: u16,
33905    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
33906    pub rssi: u8,
33907    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
33908    pub remrssi: u8,
33909    #[doc = "Remaining free transmitter buffer space."]
33910    pub txbuf: u8,
33911    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
33912    pub noise: u8,
33913    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
33914    pub remnoise: u8,
33915}
33916impl RADIO_STATUS_DATA {
33917    pub const ENCODED_LEN: usize = 9usize;
33918    pub const DEFAULT: Self = Self {
33919        rxerrors: 0_u16,
33920        fixed: 0_u16,
33921        rssi: 0_u8,
33922        remrssi: 0_u8,
33923        txbuf: 0_u8,
33924        noise: 0_u8,
33925        remnoise: 0_u8,
33926    };
33927    #[cfg(feature = "arbitrary")]
33928    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33929        use arbitrary::{Arbitrary, Unstructured};
33930        let mut buf = [0u8; 1024];
33931        rng.fill_bytes(&mut buf);
33932        let mut unstructured = Unstructured::new(&buf);
33933        Self::arbitrary(&mut unstructured).unwrap_or_default()
33934    }
33935}
33936impl Default for RADIO_STATUS_DATA {
33937    fn default() -> Self {
33938        Self::DEFAULT.clone()
33939    }
33940}
33941impl MessageData for RADIO_STATUS_DATA {
33942    type Message = MavMessage;
33943    const ID: u32 = 109u32;
33944    const NAME: &'static str = "RADIO_STATUS";
33945    const EXTRA_CRC: u8 = 185u8;
33946    const ENCODED_LEN: usize = 9usize;
33947    fn deser(
33948        _version: MavlinkVersion,
33949        __input: &[u8],
33950    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33951        let avail_len = __input.len();
33952        let mut payload_buf = [0; Self::ENCODED_LEN];
33953        let mut buf = if avail_len < Self::ENCODED_LEN {
33954            payload_buf[0..avail_len].copy_from_slice(__input);
33955            Bytes::new(&payload_buf)
33956        } else {
33957            Bytes::new(__input)
33958        };
33959        let mut __struct = Self::default();
33960        __struct.rxerrors = buf.get_u16_le()?;
33961        __struct.fixed = buf.get_u16_le()?;
33962        __struct.rssi = buf.get_u8()?;
33963        __struct.remrssi = buf.get_u8()?;
33964        __struct.txbuf = buf.get_u8()?;
33965        __struct.noise = buf.get_u8()?;
33966        __struct.remnoise = buf.get_u8()?;
33967        Ok(__struct)
33968    }
33969    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33970        let mut __tmp = BytesMut::new(bytes);
33971        #[allow(clippy::absurd_extreme_comparisons)]
33972        #[allow(unused_comparisons)]
33973        if __tmp.remaining() < Self::ENCODED_LEN {
33974            panic!(
33975                "buffer is too small (need {} bytes, but got {})",
33976                Self::ENCODED_LEN,
33977                __tmp.remaining(),
33978            )
33979        }
33980        __tmp.put_u16_le(self.rxerrors);
33981        __tmp.put_u16_le(self.fixed);
33982        __tmp.put_u8(self.rssi);
33983        __tmp.put_u8(self.remrssi);
33984        __tmp.put_u8(self.txbuf);
33985        __tmp.put_u8(self.noise);
33986        __tmp.put_u8(self.remnoise);
33987        if matches!(version, MavlinkVersion::V2) {
33988            let len = __tmp.len();
33989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33990        } else {
33991            __tmp.len()
33992        }
33993    }
33994}
33995#[doc = "Request a current rally point from MAV. MAV should respond with a RALLY_POINT message. MAV should not respond if the request is invalid."]
33996#[doc = ""]
33997#[doc = "ID: 176"]
33998#[derive(Debug, Clone, PartialEq)]
33999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34001#[cfg_attr(feature = "ts", derive(TS))]
34002#[cfg_attr(feature = "ts", ts(export))]
34003pub struct RALLY_FETCH_POINT_DATA {
34004    #[doc = "System ID."]
34005    pub target_system: u8,
34006    #[doc = "Component ID."]
34007    pub target_component: u8,
34008    #[doc = "Point index (first point is 0)."]
34009    pub idx: u8,
34010}
34011impl RALLY_FETCH_POINT_DATA {
34012    pub const ENCODED_LEN: usize = 3usize;
34013    pub const DEFAULT: Self = Self {
34014        target_system: 0_u8,
34015        target_component: 0_u8,
34016        idx: 0_u8,
34017    };
34018    #[cfg(feature = "arbitrary")]
34019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34020        use arbitrary::{Arbitrary, Unstructured};
34021        let mut buf = [0u8; 1024];
34022        rng.fill_bytes(&mut buf);
34023        let mut unstructured = Unstructured::new(&buf);
34024        Self::arbitrary(&mut unstructured).unwrap_or_default()
34025    }
34026}
34027impl Default for RALLY_FETCH_POINT_DATA {
34028    fn default() -> Self {
34029        Self::DEFAULT.clone()
34030    }
34031}
34032impl MessageData for RALLY_FETCH_POINT_DATA {
34033    type Message = MavMessage;
34034    const ID: u32 = 176u32;
34035    const NAME: &'static str = "RALLY_FETCH_POINT";
34036    const EXTRA_CRC: u8 = 234u8;
34037    const ENCODED_LEN: usize = 3usize;
34038    fn deser(
34039        _version: MavlinkVersion,
34040        __input: &[u8],
34041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34042        let avail_len = __input.len();
34043        let mut payload_buf = [0; Self::ENCODED_LEN];
34044        let mut buf = if avail_len < Self::ENCODED_LEN {
34045            payload_buf[0..avail_len].copy_from_slice(__input);
34046            Bytes::new(&payload_buf)
34047        } else {
34048            Bytes::new(__input)
34049        };
34050        let mut __struct = Self::default();
34051        __struct.target_system = buf.get_u8()?;
34052        __struct.target_component = buf.get_u8()?;
34053        __struct.idx = buf.get_u8()?;
34054        Ok(__struct)
34055    }
34056    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34057        let mut __tmp = BytesMut::new(bytes);
34058        #[allow(clippy::absurd_extreme_comparisons)]
34059        #[allow(unused_comparisons)]
34060        if __tmp.remaining() < Self::ENCODED_LEN {
34061            panic!(
34062                "buffer is too small (need {} bytes, but got {})",
34063                Self::ENCODED_LEN,
34064                __tmp.remaining(),
34065            )
34066        }
34067        __tmp.put_u8(self.target_system);
34068        __tmp.put_u8(self.target_component);
34069        __tmp.put_u8(self.idx);
34070        if matches!(version, MavlinkVersion::V2) {
34071            let len = __tmp.len();
34072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34073        } else {
34074            __tmp.len()
34075        }
34076    }
34077}
34078#[doc = "GCS."]
34079#[doc = ""]
34080#[doc = "ID: 175"]
34081#[derive(Debug, Clone, PartialEq)]
34082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34084#[cfg_attr(feature = "ts", derive(TS))]
34085#[cfg_attr(feature = "ts", ts(export))]
34086pub struct RALLY_POINT_DATA {
34087    #[doc = "Latitude of point."]
34088    pub lat: i32,
34089    #[doc = "Longitude of point."]
34090    pub lng: i32,
34091    #[doc = "Transit / loiter altitude relative to home."]
34092    pub alt: i16,
34093    #[doc = "Break altitude relative to home."]
34094    pub break_alt: i16,
34095    #[doc = "Heading to aim for when landing."]
34096    pub land_dir: u16,
34097    #[doc = "System ID."]
34098    pub target_system: u8,
34099    #[doc = "Component ID."]
34100    pub target_component: u8,
34101    #[doc = "Point index (first point is 0)."]
34102    pub idx: u8,
34103    #[doc = "Total number of points (for sanity checking)."]
34104    pub count: u8,
34105    #[doc = "Configuration flags."]
34106    pub flags: RallyFlags,
34107}
34108impl RALLY_POINT_DATA {
34109    pub const ENCODED_LEN: usize = 19usize;
34110    pub const DEFAULT: Self = Self {
34111        lat: 0_i32,
34112        lng: 0_i32,
34113        alt: 0_i16,
34114        break_alt: 0_i16,
34115        land_dir: 0_u16,
34116        target_system: 0_u8,
34117        target_component: 0_u8,
34118        idx: 0_u8,
34119        count: 0_u8,
34120        flags: RallyFlags::DEFAULT,
34121    };
34122    #[cfg(feature = "arbitrary")]
34123    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34124        use arbitrary::{Arbitrary, Unstructured};
34125        let mut buf = [0u8; 1024];
34126        rng.fill_bytes(&mut buf);
34127        let mut unstructured = Unstructured::new(&buf);
34128        Self::arbitrary(&mut unstructured).unwrap_or_default()
34129    }
34130}
34131impl Default for RALLY_POINT_DATA {
34132    fn default() -> Self {
34133        Self::DEFAULT.clone()
34134    }
34135}
34136impl MessageData for RALLY_POINT_DATA {
34137    type Message = MavMessage;
34138    const ID: u32 = 175u32;
34139    const NAME: &'static str = "RALLY_POINT";
34140    const EXTRA_CRC: u8 = 138u8;
34141    const ENCODED_LEN: usize = 19usize;
34142    fn deser(
34143        _version: MavlinkVersion,
34144        __input: &[u8],
34145    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34146        let avail_len = __input.len();
34147        let mut payload_buf = [0; Self::ENCODED_LEN];
34148        let mut buf = if avail_len < Self::ENCODED_LEN {
34149            payload_buf[0..avail_len].copy_from_slice(__input);
34150            Bytes::new(&payload_buf)
34151        } else {
34152            Bytes::new(__input)
34153        };
34154        let mut __struct = Self::default();
34155        __struct.lat = buf.get_i32_le()?;
34156        __struct.lng = buf.get_i32_le()?;
34157        __struct.alt = buf.get_i16_le()?;
34158        __struct.break_alt = buf.get_i16_le()?;
34159        __struct.land_dir = buf.get_u16_le()?;
34160        __struct.target_system = buf.get_u8()?;
34161        __struct.target_component = buf.get_u8()?;
34162        __struct.idx = buf.get_u8()?;
34163        __struct.count = buf.get_u8()?;
34164        let tmp = buf.get_u8()?;
34165        __struct.flags =
34166            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
34167                enum_type: "RallyFlags",
34168                value: tmp as u64,
34169            })?;
34170        Ok(__struct)
34171    }
34172    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34173        let mut __tmp = BytesMut::new(bytes);
34174        #[allow(clippy::absurd_extreme_comparisons)]
34175        #[allow(unused_comparisons)]
34176        if __tmp.remaining() < Self::ENCODED_LEN {
34177            panic!(
34178                "buffer is too small (need {} bytes, but got {})",
34179                Self::ENCODED_LEN,
34180                __tmp.remaining(),
34181            )
34182        }
34183        __tmp.put_i32_le(self.lat);
34184        __tmp.put_i32_le(self.lng);
34185        __tmp.put_i16_le(self.alt);
34186        __tmp.put_i16_le(self.break_alt);
34187        __tmp.put_u16_le(self.land_dir);
34188        __tmp.put_u8(self.target_system);
34189        __tmp.put_u8(self.target_component);
34190        __tmp.put_u8(self.idx);
34191        __tmp.put_u8(self.count);
34192        __tmp.put_u8(self.flags as u8);
34193        if matches!(version, MavlinkVersion::V2) {
34194            let len = __tmp.len();
34195            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34196        } else {
34197            __tmp.len()
34198        }
34199    }
34200}
34201#[doc = "Rangefinder reporting."]
34202#[doc = ""]
34203#[doc = "ID: 173"]
34204#[derive(Debug, Clone, PartialEq)]
34205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34207#[cfg_attr(feature = "ts", derive(TS))]
34208#[cfg_attr(feature = "ts", ts(export))]
34209pub struct RANGEFINDER_DATA {
34210    #[doc = "Distance."]
34211    pub distance: f32,
34212    #[doc = "Raw voltage if available, zero otherwise."]
34213    pub voltage: f32,
34214}
34215impl RANGEFINDER_DATA {
34216    pub const ENCODED_LEN: usize = 8usize;
34217    pub const DEFAULT: Self = Self {
34218        distance: 0.0_f32,
34219        voltage: 0.0_f32,
34220    };
34221    #[cfg(feature = "arbitrary")]
34222    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34223        use arbitrary::{Arbitrary, Unstructured};
34224        let mut buf = [0u8; 1024];
34225        rng.fill_bytes(&mut buf);
34226        let mut unstructured = Unstructured::new(&buf);
34227        Self::arbitrary(&mut unstructured).unwrap_or_default()
34228    }
34229}
34230impl Default for RANGEFINDER_DATA {
34231    fn default() -> Self {
34232        Self::DEFAULT.clone()
34233    }
34234}
34235impl MessageData for RANGEFINDER_DATA {
34236    type Message = MavMessage;
34237    const ID: u32 = 173u32;
34238    const NAME: &'static str = "RANGEFINDER";
34239    const EXTRA_CRC: u8 = 83u8;
34240    const ENCODED_LEN: usize = 8usize;
34241    fn deser(
34242        _version: MavlinkVersion,
34243        __input: &[u8],
34244    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34245        let avail_len = __input.len();
34246        let mut payload_buf = [0; Self::ENCODED_LEN];
34247        let mut buf = if avail_len < Self::ENCODED_LEN {
34248            payload_buf[0..avail_len].copy_from_slice(__input);
34249            Bytes::new(&payload_buf)
34250        } else {
34251            Bytes::new(__input)
34252        };
34253        let mut __struct = Self::default();
34254        __struct.distance = buf.get_f32_le()?;
34255        __struct.voltage = buf.get_f32_le()?;
34256        Ok(__struct)
34257    }
34258    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34259        let mut __tmp = BytesMut::new(bytes);
34260        #[allow(clippy::absurd_extreme_comparisons)]
34261        #[allow(unused_comparisons)]
34262        if __tmp.remaining() < Self::ENCODED_LEN {
34263            panic!(
34264                "buffer is too small (need {} bytes, but got {})",
34265                Self::ENCODED_LEN,
34266                __tmp.remaining(),
34267            )
34268        }
34269        __tmp.put_f32_le(self.distance);
34270        __tmp.put_f32_le(self.voltage);
34271        if matches!(version, MavlinkVersion::V2) {
34272            let len = __tmp.len();
34273            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34274        } else {
34275            __tmp.len()
34276        }
34277    }
34278}
34279#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
34280#[doc = ""]
34281#[doc = "ID: 27"]
34282#[derive(Debug, Clone, PartialEq)]
34283#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34284#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34285#[cfg_attr(feature = "ts", derive(TS))]
34286#[cfg_attr(feature = "ts", ts(export))]
34287pub struct RAW_IMU_DATA {
34288    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
34289    pub time_usec: u64,
34290    #[doc = "X acceleration (raw)"]
34291    pub xacc: i16,
34292    #[doc = "Y acceleration (raw)"]
34293    pub yacc: i16,
34294    #[doc = "Z acceleration (raw)"]
34295    pub zacc: i16,
34296    #[doc = "Angular speed around X axis (raw)"]
34297    pub xgyro: i16,
34298    #[doc = "Angular speed around Y axis (raw)"]
34299    pub ygyro: i16,
34300    #[doc = "Angular speed around Z axis (raw)"]
34301    pub zgyro: i16,
34302    #[doc = "X Magnetic field (raw)"]
34303    pub xmag: i16,
34304    #[doc = "Y Magnetic field (raw)"]
34305    pub ymag: i16,
34306    #[doc = "Z Magnetic field (raw)"]
34307    pub zmag: i16,
34308    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
34309    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34310    pub id: u8,
34311    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
34312    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34313    pub temperature: i16,
34314}
34315impl RAW_IMU_DATA {
34316    pub const ENCODED_LEN: usize = 29usize;
34317    pub const DEFAULT: Self = Self {
34318        time_usec: 0_u64,
34319        xacc: 0_i16,
34320        yacc: 0_i16,
34321        zacc: 0_i16,
34322        xgyro: 0_i16,
34323        ygyro: 0_i16,
34324        zgyro: 0_i16,
34325        xmag: 0_i16,
34326        ymag: 0_i16,
34327        zmag: 0_i16,
34328        id: 0_u8,
34329        temperature: 0_i16,
34330    };
34331    #[cfg(feature = "arbitrary")]
34332    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34333        use arbitrary::{Arbitrary, Unstructured};
34334        let mut buf = [0u8; 1024];
34335        rng.fill_bytes(&mut buf);
34336        let mut unstructured = Unstructured::new(&buf);
34337        Self::arbitrary(&mut unstructured).unwrap_or_default()
34338    }
34339}
34340impl Default for RAW_IMU_DATA {
34341    fn default() -> Self {
34342        Self::DEFAULT.clone()
34343    }
34344}
34345impl MessageData for RAW_IMU_DATA {
34346    type Message = MavMessage;
34347    const ID: u32 = 27u32;
34348    const NAME: &'static str = "RAW_IMU";
34349    const EXTRA_CRC: u8 = 144u8;
34350    const ENCODED_LEN: usize = 29usize;
34351    fn deser(
34352        _version: MavlinkVersion,
34353        __input: &[u8],
34354    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34355        let avail_len = __input.len();
34356        let mut payload_buf = [0; Self::ENCODED_LEN];
34357        let mut buf = if avail_len < Self::ENCODED_LEN {
34358            payload_buf[0..avail_len].copy_from_slice(__input);
34359            Bytes::new(&payload_buf)
34360        } else {
34361            Bytes::new(__input)
34362        };
34363        let mut __struct = Self::default();
34364        __struct.time_usec = buf.get_u64_le()?;
34365        __struct.xacc = buf.get_i16_le()?;
34366        __struct.yacc = buf.get_i16_le()?;
34367        __struct.zacc = buf.get_i16_le()?;
34368        __struct.xgyro = buf.get_i16_le()?;
34369        __struct.ygyro = buf.get_i16_le()?;
34370        __struct.zgyro = buf.get_i16_le()?;
34371        __struct.xmag = buf.get_i16_le()?;
34372        __struct.ymag = buf.get_i16_le()?;
34373        __struct.zmag = buf.get_i16_le()?;
34374        __struct.id = buf.get_u8()?;
34375        __struct.temperature = buf.get_i16_le()?;
34376        Ok(__struct)
34377    }
34378    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34379        let mut __tmp = BytesMut::new(bytes);
34380        #[allow(clippy::absurd_extreme_comparisons)]
34381        #[allow(unused_comparisons)]
34382        if __tmp.remaining() < Self::ENCODED_LEN {
34383            panic!(
34384                "buffer is too small (need {} bytes, but got {})",
34385                Self::ENCODED_LEN,
34386                __tmp.remaining(),
34387            )
34388        }
34389        __tmp.put_u64_le(self.time_usec);
34390        __tmp.put_i16_le(self.xacc);
34391        __tmp.put_i16_le(self.yacc);
34392        __tmp.put_i16_le(self.zacc);
34393        __tmp.put_i16_le(self.xgyro);
34394        __tmp.put_i16_le(self.ygyro);
34395        __tmp.put_i16_le(self.zgyro);
34396        __tmp.put_i16_le(self.xmag);
34397        __tmp.put_i16_le(self.ymag);
34398        __tmp.put_i16_le(self.zmag);
34399        if matches!(version, MavlinkVersion::V2) {
34400            __tmp.put_u8(self.id);
34401            __tmp.put_i16_le(self.temperature);
34402            let len = __tmp.len();
34403            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34404        } else {
34405            __tmp.len()
34406        }
34407    }
34408}
34409#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
34410#[doc = ""]
34411#[doc = "ID: 28"]
34412#[derive(Debug, Clone, PartialEq)]
34413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34415#[cfg_attr(feature = "ts", derive(TS))]
34416#[cfg_attr(feature = "ts", ts(export))]
34417pub struct RAW_PRESSURE_DATA {
34418    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
34419    pub time_usec: u64,
34420    #[doc = "Absolute pressure (raw)"]
34421    pub press_abs: i16,
34422    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
34423    pub press_diff1: i16,
34424    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
34425    pub press_diff2: i16,
34426    #[doc = "Raw Temperature measurement (raw)"]
34427    pub temperature: i16,
34428}
34429impl RAW_PRESSURE_DATA {
34430    pub const ENCODED_LEN: usize = 16usize;
34431    pub const DEFAULT: Self = Self {
34432        time_usec: 0_u64,
34433        press_abs: 0_i16,
34434        press_diff1: 0_i16,
34435        press_diff2: 0_i16,
34436        temperature: 0_i16,
34437    };
34438    #[cfg(feature = "arbitrary")]
34439    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34440        use arbitrary::{Arbitrary, Unstructured};
34441        let mut buf = [0u8; 1024];
34442        rng.fill_bytes(&mut buf);
34443        let mut unstructured = Unstructured::new(&buf);
34444        Self::arbitrary(&mut unstructured).unwrap_or_default()
34445    }
34446}
34447impl Default for RAW_PRESSURE_DATA {
34448    fn default() -> Self {
34449        Self::DEFAULT.clone()
34450    }
34451}
34452impl MessageData for RAW_PRESSURE_DATA {
34453    type Message = MavMessage;
34454    const ID: u32 = 28u32;
34455    const NAME: &'static str = "RAW_PRESSURE";
34456    const EXTRA_CRC: u8 = 67u8;
34457    const ENCODED_LEN: usize = 16usize;
34458    fn deser(
34459        _version: MavlinkVersion,
34460        __input: &[u8],
34461    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34462        let avail_len = __input.len();
34463        let mut payload_buf = [0; Self::ENCODED_LEN];
34464        let mut buf = if avail_len < Self::ENCODED_LEN {
34465            payload_buf[0..avail_len].copy_from_slice(__input);
34466            Bytes::new(&payload_buf)
34467        } else {
34468            Bytes::new(__input)
34469        };
34470        let mut __struct = Self::default();
34471        __struct.time_usec = buf.get_u64_le()?;
34472        __struct.press_abs = buf.get_i16_le()?;
34473        __struct.press_diff1 = buf.get_i16_le()?;
34474        __struct.press_diff2 = buf.get_i16_le()?;
34475        __struct.temperature = buf.get_i16_le()?;
34476        Ok(__struct)
34477    }
34478    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34479        let mut __tmp = BytesMut::new(bytes);
34480        #[allow(clippy::absurd_extreme_comparisons)]
34481        #[allow(unused_comparisons)]
34482        if __tmp.remaining() < Self::ENCODED_LEN {
34483            panic!(
34484                "buffer is too small (need {} bytes, but got {})",
34485                Self::ENCODED_LEN,
34486                __tmp.remaining(),
34487            )
34488        }
34489        __tmp.put_u64_le(self.time_usec);
34490        __tmp.put_i16_le(self.press_abs);
34491        __tmp.put_i16_le(self.press_diff1);
34492        __tmp.put_i16_le(self.press_diff2);
34493        __tmp.put_i16_le(self.temperature);
34494        if matches!(version, MavlinkVersion::V2) {
34495            let len = __tmp.len();
34496            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34497        } else {
34498            __tmp.len()
34499        }
34500    }
34501}
34502#[doc = "RPM sensor data message."]
34503#[doc = ""]
34504#[doc = "ID: 339"]
34505#[derive(Debug, Clone, PartialEq)]
34506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34508#[cfg_attr(feature = "ts", derive(TS))]
34509#[cfg_attr(feature = "ts", ts(export))]
34510pub struct RAW_RPM_DATA {
34511    #[doc = "Indicated rate"]
34512    pub frequency: f32,
34513    #[doc = "Index of this RPM sensor (0-indexed)"]
34514    pub index: u8,
34515}
34516impl RAW_RPM_DATA {
34517    pub const ENCODED_LEN: usize = 5usize;
34518    pub const DEFAULT: Self = Self {
34519        frequency: 0.0_f32,
34520        index: 0_u8,
34521    };
34522    #[cfg(feature = "arbitrary")]
34523    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34524        use arbitrary::{Arbitrary, Unstructured};
34525        let mut buf = [0u8; 1024];
34526        rng.fill_bytes(&mut buf);
34527        let mut unstructured = Unstructured::new(&buf);
34528        Self::arbitrary(&mut unstructured).unwrap_or_default()
34529    }
34530}
34531impl Default for RAW_RPM_DATA {
34532    fn default() -> Self {
34533        Self::DEFAULT.clone()
34534    }
34535}
34536impl MessageData for RAW_RPM_DATA {
34537    type Message = MavMessage;
34538    const ID: u32 = 339u32;
34539    const NAME: &'static str = "RAW_RPM";
34540    const EXTRA_CRC: u8 = 199u8;
34541    const ENCODED_LEN: usize = 5usize;
34542    fn deser(
34543        _version: MavlinkVersion,
34544        __input: &[u8],
34545    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34546        let avail_len = __input.len();
34547        let mut payload_buf = [0; Self::ENCODED_LEN];
34548        let mut buf = if avail_len < Self::ENCODED_LEN {
34549            payload_buf[0..avail_len].copy_from_slice(__input);
34550            Bytes::new(&payload_buf)
34551        } else {
34552            Bytes::new(__input)
34553        };
34554        let mut __struct = Self::default();
34555        __struct.frequency = buf.get_f32_le()?;
34556        __struct.index = buf.get_u8()?;
34557        Ok(__struct)
34558    }
34559    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34560        let mut __tmp = BytesMut::new(bytes);
34561        #[allow(clippy::absurd_extreme_comparisons)]
34562        #[allow(unused_comparisons)]
34563        if __tmp.remaining() < Self::ENCODED_LEN {
34564            panic!(
34565                "buffer is too small (need {} bytes, but got {})",
34566                Self::ENCODED_LEN,
34567                __tmp.remaining(),
34568            )
34569        }
34570        __tmp.put_f32_le(self.frequency);
34571        __tmp.put_u8(self.index);
34572        if matches!(version, MavlinkVersion::V2) {
34573            let len = __tmp.len();
34574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34575        } else {
34576            __tmp.len()
34577        }
34578    }
34579}
34580#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34581#[doc = ""]
34582#[doc = "ID: 65"]
34583#[derive(Debug, Clone, PartialEq)]
34584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34586#[cfg_attr(feature = "ts", derive(TS))]
34587#[cfg_attr(feature = "ts", ts(export))]
34588pub struct RC_CHANNELS_DATA {
34589    #[doc = "Timestamp (time since system boot)."]
34590    pub time_boot_ms: u32,
34591    #[doc = "RC channel 1 value."]
34592    pub chan1_raw: u16,
34593    #[doc = "RC channel 2 value."]
34594    pub chan2_raw: u16,
34595    #[doc = "RC channel 3 value."]
34596    pub chan3_raw: u16,
34597    #[doc = "RC channel 4 value."]
34598    pub chan4_raw: u16,
34599    #[doc = "RC channel 5 value."]
34600    pub chan5_raw: u16,
34601    #[doc = "RC channel 6 value."]
34602    pub chan6_raw: u16,
34603    #[doc = "RC channel 7 value."]
34604    pub chan7_raw: u16,
34605    #[doc = "RC channel 8 value."]
34606    pub chan8_raw: u16,
34607    #[doc = "RC channel 9 value."]
34608    pub chan9_raw: u16,
34609    #[doc = "RC channel 10 value."]
34610    pub chan10_raw: u16,
34611    #[doc = "RC channel 11 value."]
34612    pub chan11_raw: u16,
34613    #[doc = "RC channel 12 value."]
34614    pub chan12_raw: u16,
34615    #[doc = "RC channel 13 value."]
34616    pub chan13_raw: u16,
34617    #[doc = "RC channel 14 value."]
34618    pub chan14_raw: u16,
34619    #[doc = "RC channel 15 value."]
34620    pub chan15_raw: u16,
34621    #[doc = "RC channel 16 value."]
34622    pub chan16_raw: u16,
34623    #[doc = "RC channel 17 value."]
34624    pub chan17_raw: u16,
34625    #[doc = "RC channel 18 value."]
34626    pub chan18_raw: u16,
34627    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
34628    pub chancount: u8,
34629    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
34630    pub rssi: u8,
34631}
34632impl RC_CHANNELS_DATA {
34633    pub const ENCODED_LEN: usize = 42usize;
34634    pub const DEFAULT: Self = Self {
34635        time_boot_ms: 0_u32,
34636        chan1_raw: 0_u16,
34637        chan2_raw: 0_u16,
34638        chan3_raw: 0_u16,
34639        chan4_raw: 0_u16,
34640        chan5_raw: 0_u16,
34641        chan6_raw: 0_u16,
34642        chan7_raw: 0_u16,
34643        chan8_raw: 0_u16,
34644        chan9_raw: 0_u16,
34645        chan10_raw: 0_u16,
34646        chan11_raw: 0_u16,
34647        chan12_raw: 0_u16,
34648        chan13_raw: 0_u16,
34649        chan14_raw: 0_u16,
34650        chan15_raw: 0_u16,
34651        chan16_raw: 0_u16,
34652        chan17_raw: 0_u16,
34653        chan18_raw: 0_u16,
34654        chancount: 0_u8,
34655        rssi: 0_u8,
34656    };
34657    #[cfg(feature = "arbitrary")]
34658    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34659        use arbitrary::{Arbitrary, Unstructured};
34660        let mut buf = [0u8; 1024];
34661        rng.fill_bytes(&mut buf);
34662        let mut unstructured = Unstructured::new(&buf);
34663        Self::arbitrary(&mut unstructured).unwrap_or_default()
34664    }
34665}
34666impl Default for RC_CHANNELS_DATA {
34667    fn default() -> Self {
34668        Self::DEFAULT.clone()
34669    }
34670}
34671impl MessageData for RC_CHANNELS_DATA {
34672    type Message = MavMessage;
34673    const ID: u32 = 65u32;
34674    const NAME: &'static str = "RC_CHANNELS";
34675    const EXTRA_CRC: u8 = 118u8;
34676    const ENCODED_LEN: usize = 42usize;
34677    fn deser(
34678        _version: MavlinkVersion,
34679        __input: &[u8],
34680    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34681        let avail_len = __input.len();
34682        let mut payload_buf = [0; Self::ENCODED_LEN];
34683        let mut buf = if avail_len < Self::ENCODED_LEN {
34684            payload_buf[0..avail_len].copy_from_slice(__input);
34685            Bytes::new(&payload_buf)
34686        } else {
34687            Bytes::new(__input)
34688        };
34689        let mut __struct = Self::default();
34690        __struct.time_boot_ms = buf.get_u32_le()?;
34691        __struct.chan1_raw = buf.get_u16_le()?;
34692        __struct.chan2_raw = buf.get_u16_le()?;
34693        __struct.chan3_raw = buf.get_u16_le()?;
34694        __struct.chan4_raw = buf.get_u16_le()?;
34695        __struct.chan5_raw = buf.get_u16_le()?;
34696        __struct.chan6_raw = buf.get_u16_le()?;
34697        __struct.chan7_raw = buf.get_u16_le()?;
34698        __struct.chan8_raw = buf.get_u16_le()?;
34699        __struct.chan9_raw = buf.get_u16_le()?;
34700        __struct.chan10_raw = buf.get_u16_le()?;
34701        __struct.chan11_raw = buf.get_u16_le()?;
34702        __struct.chan12_raw = buf.get_u16_le()?;
34703        __struct.chan13_raw = buf.get_u16_le()?;
34704        __struct.chan14_raw = buf.get_u16_le()?;
34705        __struct.chan15_raw = buf.get_u16_le()?;
34706        __struct.chan16_raw = buf.get_u16_le()?;
34707        __struct.chan17_raw = buf.get_u16_le()?;
34708        __struct.chan18_raw = buf.get_u16_le()?;
34709        __struct.chancount = buf.get_u8()?;
34710        __struct.rssi = buf.get_u8()?;
34711        Ok(__struct)
34712    }
34713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34714        let mut __tmp = BytesMut::new(bytes);
34715        #[allow(clippy::absurd_extreme_comparisons)]
34716        #[allow(unused_comparisons)]
34717        if __tmp.remaining() < Self::ENCODED_LEN {
34718            panic!(
34719                "buffer is too small (need {} bytes, but got {})",
34720                Self::ENCODED_LEN,
34721                __tmp.remaining(),
34722            )
34723        }
34724        __tmp.put_u32_le(self.time_boot_ms);
34725        __tmp.put_u16_le(self.chan1_raw);
34726        __tmp.put_u16_le(self.chan2_raw);
34727        __tmp.put_u16_le(self.chan3_raw);
34728        __tmp.put_u16_le(self.chan4_raw);
34729        __tmp.put_u16_le(self.chan5_raw);
34730        __tmp.put_u16_le(self.chan6_raw);
34731        __tmp.put_u16_le(self.chan7_raw);
34732        __tmp.put_u16_le(self.chan8_raw);
34733        __tmp.put_u16_le(self.chan9_raw);
34734        __tmp.put_u16_le(self.chan10_raw);
34735        __tmp.put_u16_le(self.chan11_raw);
34736        __tmp.put_u16_le(self.chan12_raw);
34737        __tmp.put_u16_le(self.chan13_raw);
34738        __tmp.put_u16_le(self.chan14_raw);
34739        __tmp.put_u16_le(self.chan15_raw);
34740        __tmp.put_u16_le(self.chan16_raw);
34741        __tmp.put_u16_le(self.chan17_raw);
34742        __tmp.put_u16_le(self.chan18_raw);
34743        __tmp.put_u8(self.chancount);
34744        __tmp.put_u8(self.rssi);
34745        if matches!(version, MavlinkVersion::V2) {
34746            let len = __tmp.len();
34747            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34748        } else {
34749            __tmp.len()
34750        }
34751    }
34752}
34753#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
34754#[doc = ""]
34755#[doc = "ID: 70"]
34756#[derive(Debug, Clone, PartialEq)]
34757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34759#[cfg_attr(feature = "ts", derive(TS))]
34760#[cfg_attr(feature = "ts", ts(export))]
34761pub struct RC_CHANNELS_OVERRIDE_DATA {
34762    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
34763    pub chan1_raw: u16,
34764    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
34765    pub chan2_raw: u16,
34766    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
34767    pub chan3_raw: u16,
34768    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
34769    pub chan4_raw: u16,
34770    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
34771    pub chan5_raw: u16,
34772    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
34773    pub chan6_raw: u16,
34774    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
34775    pub chan7_raw: u16,
34776    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
34777    pub chan8_raw: u16,
34778    #[doc = "System ID"]
34779    pub target_system: u8,
34780    #[doc = "Component ID"]
34781    pub target_component: u8,
34782    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
34783    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34784    pub chan9_raw: u16,
34785    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
34786    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34787    pub chan10_raw: u16,
34788    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
34789    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34790    pub chan11_raw: u16,
34791    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
34792    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34793    pub chan12_raw: u16,
34794    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
34795    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34796    pub chan13_raw: u16,
34797    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
34798    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34799    pub chan14_raw: u16,
34800    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
34801    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34802    pub chan15_raw: u16,
34803    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
34804    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34805    pub chan16_raw: u16,
34806    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
34807    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34808    pub chan17_raw: u16,
34809    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
34810    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34811    pub chan18_raw: u16,
34812}
34813impl RC_CHANNELS_OVERRIDE_DATA {
34814    pub const ENCODED_LEN: usize = 38usize;
34815    pub const DEFAULT: Self = Self {
34816        chan1_raw: 0_u16,
34817        chan2_raw: 0_u16,
34818        chan3_raw: 0_u16,
34819        chan4_raw: 0_u16,
34820        chan5_raw: 0_u16,
34821        chan6_raw: 0_u16,
34822        chan7_raw: 0_u16,
34823        chan8_raw: 0_u16,
34824        target_system: 0_u8,
34825        target_component: 0_u8,
34826        chan9_raw: 0_u16,
34827        chan10_raw: 0_u16,
34828        chan11_raw: 0_u16,
34829        chan12_raw: 0_u16,
34830        chan13_raw: 0_u16,
34831        chan14_raw: 0_u16,
34832        chan15_raw: 0_u16,
34833        chan16_raw: 0_u16,
34834        chan17_raw: 0_u16,
34835        chan18_raw: 0_u16,
34836    };
34837    #[cfg(feature = "arbitrary")]
34838    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34839        use arbitrary::{Arbitrary, Unstructured};
34840        let mut buf = [0u8; 1024];
34841        rng.fill_bytes(&mut buf);
34842        let mut unstructured = Unstructured::new(&buf);
34843        Self::arbitrary(&mut unstructured).unwrap_or_default()
34844    }
34845}
34846impl Default for RC_CHANNELS_OVERRIDE_DATA {
34847    fn default() -> Self {
34848        Self::DEFAULT.clone()
34849    }
34850}
34851impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
34852    type Message = MavMessage;
34853    const ID: u32 = 70u32;
34854    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
34855    const EXTRA_CRC: u8 = 124u8;
34856    const ENCODED_LEN: usize = 38usize;
34857    fn deser(
34858        _version: MavlinkVersion,
34859        __input: &[u8],
34860    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34861        let avail_len = __input.len();
34862        let mut payload_buf = [0; Self::ENCODED_LEN];
34863        let mut buf = if avail_len < Self::ENCODED_LEN {
34864            payload_buf[0..avail_len].copy_from_slice(__input);
34865            Bytes::new(&payload_buf)
34866        } else {
34867            Bytes::new(__input)
34868        };
34869        let mut __struct = Self::default();
34870        __struct.chan1_raw = buf.get_u16_le()?;
34871        __struct.chan2_raw = buf.get_u16_le()?;
34872        __struct.chan3_raw = buf.get_u16_le()?;
34873        __struct.chan4_raw = buf.get_u16_le()?;
34874        __struct.chan5_raw = buf.get_u16_le()?;
34875        __struct.chan6_raw = buf.get_u16_le()?;
34876        __struct.chan7_raw = buf.get_u16_le()?;
34877        __struct.chan8_raw = buf.get_u16_le()?;
34878        __struct.target_system = buf.get_u8()?;
34879        __struct.target_component = buf.get_u8()?;
34880        __struct.chan9_raw = buf.get_u16_le()?;
34881        __struct.chan10_raw = buf.get_u16_le()?;
34882        __struct.chan11_raw = buf.get_u16_le()?;
34883        __struct.chan12_raw = buf.get_u16_le()?;
34884        __struct.chan13_raw = buf.get_u16_le()?;
34885        __struct.chan14_raw = buf.get_u16_le()?;
34886        __struct.chan15_raw = buf.get_u16_le()?;
34887        __struct.chan16_raw = buf.get_u16_le()?;
34888        __struct.chan17_raw = buf.get_u16_le()?;
34889        __struct.chan18_raw = buf.get_u16_le()?;
34890        Ok(__struct)
34891    }
34892    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34893        let mut __tmp = BytesMut::new(bytes);
34894        #[allow(clippy::absurd_extreme_comparisons)]
34895        #[allow(unused_comparisons)]
34896        if __tmp.remaining() < Self::ENCODED_LEN {
34897            panic!(
34898                "buffer is too small (need {} bytes, but got {})",
34899                Self::ENCODED_LEN,
34900                __tmp.remaining(),
34901            )
34902        }
34903        __tmp.put_u16_le(self.chan1_raw);
34904        __tmp.put_u16_le(self.chan2_raw);
34905        __tmp.put_u16_le(self.chan3_raw);
34906        __tmp.put_u16_le(self.chan4_raw);
34907        __tmp.put_u16_le(self.chan5_raw);
34908        __tmp.put_u16_le(self.chan6_raw);
34909        __tmp.put_u16_le(self.chan7_raw);
34910        __tmp.put_u16_le(self.chan8_raw);
34911        __tmp.put_u8(self.target_system);
34912        __tmp.put_u8(self.target_component);
34913        if matches!(version, MavlinkVersion::V2) {
34914            __tmp.put_u16_le(self.chan9_raw);
34915            __tmp.put_u16_le(self.chan10_raw);
34916            __tmp.put_u16_le(self.chan11_raw);
34917            __tmp.put_u16_le(self.chan12_raw);
34918            __tmp.put_u16_le(self.chan13_raw);
34919            __tmp.put_u16_le(self.chan14_raw);
34920            __tmp.put_u16_le(self.chan15_raw);
34921            __tmp.put_u16_le(self.chan16_raw);
34922            __tmp.put_u16_le(self.chan17_raw);
34923            __tmp.put_u16_le(self.chan18_raw);
34924            let len = __tmp.len();
34925            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34926        } else {
34927            __tmp.len()
34928        }
34929    }
34930}
34931#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34932#[doc = ""]
34933#[doc = "ID: 35"]
34934#[derive(Debug, Clone, PartialEq)]
34935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34936#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34937#[cfg_attr(feature = "ts", derive(TS))]
34938#[cfg_attr(feature = "ts", ts(export))]
34939pub struct RC_CHANNELS_RAW_DATA {
34940    #[doc = "Timestamp (time since system boot)."]
34941    pub time_boot_ms: u32,
34942    #[doc = "RC channel 1 value."]
34943    pub chan1_raw: u16,
34944    #[doc = "RC channel 2 value."]
34945    pub chan2_raw: u16,
34946    #[doc = "RC channel 3 value."]
34947    pub chan3_raw: u16,
34948    #[doc = "RC channel 4 value."]
34949    pub chan4_raw: u16,
34950    #[doc = "RC channel 5 value."]
34951    pub chan5_raw: u16,
34952    #[doc = "RC channel 6 value."]
34953    pub chan6_raw: u16,
34954    #[doc = "RC channel 7 value."]
34955    pub chan7_raw: u16,
34956    #[doc = "RC channel 8 value."]
34957    pub chan8_raw: u16,
34958    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
34959    pub port: u8,
34960    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
34961    pub rssi: u8,
34962}
34963impl RC_CHANNELS_RAW_DATA {
34964    pub const ENCODED_LEN: usize = 22usize;
34965    pub const DEFAULT: Self = Self {
34966        time_boot_ms: 0_u32,
34967        chan1_raw: 0_u16,
34968        chan2_raw: 0_u16,
34969        chan3_raw: 0_u16,
34970        chan4_raw: 0_u16,
34971        chan5_raw: 0_u16,
34972        chan6_raw: 0_u16,
34973        chan7_raw: 0_u16,
34974        chan8_raw: 0_u16,
34975        port: 0_u8,
34976        rssi: 0_u8,
34977    };
34978    #[cfg(feature = "arbitrary")]
34979    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34980        use arbitrary::{Arbitrary, Unstructured};
34981        let mut buf = [0u8; 1024];
34982        rng.fill_bytes(&mut buf);
34983        let mut unstructured = Unstructured::new(&buf);
34984        Self::arbitrary(&mut unstructured).unwrap_or_default()
34985    }
34986}
34987impl Default for RC_CHANNELS_RAW_DATA {
34988    fn default() -> Self {
34989        Self::DEFAULT.clone()
34990    }
34991}
34992impl MessageData for RC_CHANNELS_RAW_DATA {
34993    type Message = MavMessage;
34994    const ID: u32 = 35u32;
34995    const NAME: &'static str = "RC_CHANNELS_RAW";
34996    const EXTRA_CRC: u8 = 244u8;
34997    const ENCODED_LEN: usize = 22usize;
34998    fn deser(
34999        _version: MavlinkVersion,
35000        __input: &[u8],
35001    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35002        let avail_len = __input.len();
35003        let mut payload_buf = [0; Self::ENCODED_LEN];
35004        let mut buf = if avail_len < Self::ENCODED_LEN {
35005            payload_buf[0..avail_len].copy_from_slice(__input);
35006            Bytes::new(&payload_buf)
35007        } else {
35008            Bytes::new(__input)
35009        };
35010        let mut __struct = Self::default();
35011        __struct.time_boot_ms = buf.get_u32_le()?;
35012        __struct.chan1_raw = buf.get_u16_le()?;
35013        __struct.chan2_raw = buf.get_u16_le()?;
35014        __struct.chan3_raw = buf.get_u16_le()?;
35015        __struct.chan4_raw = buf.get_u16_le()?;
35016        __struct.chan5_raw = buf.get_u16_le()?;
35017        __struct.chan6_raw = buf.get_u16_le()?;
35018        __struct.chan7_raw = buf.get_u16_le()?;
35019        __struct.chan8_raw = buf.get_u16_le()?;
35020        __struct.port = buf.get_u8()?;
35021        __struct.rssi = buf.get_u8()?;
35022        Ok(__struct)
35023    }
35024    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35025        let mut __tmp = BytesMut::new(bytes);
35026        #[allow(clippy::absurd_extreme_comparisons)]
35027        #[allow(unused_comparisons)]
35028        if __tmp.remaining() < Self::ENCODED_LEN {
35029            panic!(
35030                "buffer is too small (need {} bytes, but got {})",
35031                Self::ENCODED_LEN,
35032                __tmp.remaining(),
35033            )
35034        }
35035        __tmp.put_u32_le(self.time_boot_ms);
35036        __tmp.put_u16_le(self.chan1_raw);
35037        __tmp.put_u16_le(self.chan2_raw);
35038        __tmp.put_u16_le(self.chan3_raw);
35039        __tmp.put_u16_le(self.chan4_raw);
35040        __tmp.put_u16_le(self.chan5_raw);
35041        __tmp.put_u16_le(self.chan6_raw);
35042        __tmp.put_u16_le(self.chan7_raw);
35043        __tmp.put_u16_le(self.chan8_raw);
35044        __tmp.put_u8(self.port);
35045        __tmp.put_u8(self.rssi);
35046        if matches!(version, MavlinkVersion::V2) {
35047            let len = __tmp.len();
35048            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35049        } else {
35050            __tmp.len()
35051        }
35052    }
35053}
35054#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
35055#[doc = ""]
35056#[doc = "ID: 34"]
35057#[derive(Debug, Clone, PartialEq)]
35058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35060#[cfg_attr(feature = "ts", derive(TS))]
35061#[cfg_attr(feature = "ts", ts(export))]
35062pub struct RC_CHANNELS_SCALED_DATA {
35063    #[doc = "Timestamp (time since system boot)."]
35064    pub time_boot_ms: u32,
35065    #[doc = "RC channel 1 value scaled."]
35066    pub chan1_scaled: i16,
35067    #[doc = "RC channel 2 value scaled."]
35068    pub chan2_scaled: i16,
35069    #[doc = "RC channel 3 value scaled."]
35070    pub chan3_scaled: i16,
35071    #[doc = "RC channel 4 value scaled."]
35072    pub chan4_scaled: i16,
35073    #[doc = "RC channel 5 value scaled."]
35074    pub chan5_scaled: i16,
35075    #[doc = "RC channel 6 value scaled."]
35076    pub chan6_scaled: i16,
35077    #[doc = "RC channel 7 value scaled."]
35078    pub chan7_scaled: i16,
35079    #[doc = "RC channel 8 value scaled."]
35080    pub chan8_scaled: i16,
35081    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
35082    pub port: u8,
35083    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
35084    pub rssi: u8,
35085}
35086impl RC_CHANNELS_SCALED_DATA {
35087    pub const ENCODED_LEN: usize = 22usize;
35088    pub const DEFAULT: Self = Self {
35089        time_boot_ms: 0_u32,
35090        chan1_scaled: 0_i16,
35091        chan2_scaled: 0_i16,
35092        chan3_scaled: 0_i16,
35093        chan4_scaled: 0_i16,
35094        chan5_scaled: 0_i16,
35095        chan6_scaled: 0_i16,
35096        chan7_scaled: 0_i16,
35097        chan8_scaled: 0_i16,
35098        port: 0_u8,
35099        rssi: 0_u8,
35100    };
35101    #[cfg(feature = "arbitrary")]
35102    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35103        use arbitrary::{Arbitrary, Unstructured};
35104        let mut buf = [0u8; 1024];
35105        rng.fill_bytes(&mut buf);
35106        let mut unstructured = Unstructured::new(&buf);
35107        Self::arbitrary(&mut unstructured).unwrap_or_default()
35108    }
35109}
35110impl Default for RC_CHANNELS_SCALED_DATA {
35111    fn default() -> Self {
35112        Self::DEFAULT.clone()
35113    }
35114}
35115impl MessageData for RC_CHANNELS_SCALED_DATA {
35116    type Message = MavMessage;
35117    const ID: u32 = 34u32;
35118    const NAME: &'static str = "RC_CHANNELS_SCALED";
35119    const EXTRA_CRC: u8 = 237u8;
35120    const ENCODED_LEN: usize = 22usize;
35121    fn deser(
35122        _version: MavlinkVersion,
35123        __input: &[u8],
35124    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35125        let avail_len = __input.len();
35126        let mut payload_buf = [0; Self::ENCODED_LEN];
35127        let mut buf = if avail_len < Self::ENCODED_LEN {
35128            payload_buf[0..avail_len].copy_from_slice(__input);
35129            Bytes::new(&payload_buf)
35130        } else {
35131            Bytes::new(__input)
35132        };
35133        let mut __struct = Self::default();
35134        __struct.time_boot_ms = buf.get_u32_le()?;
35135        __struct.chan1_scaled = buf.get_i16_le()?;
35136        __struct.chan2_scaled = buf.get_i16_le()?;
35137        __struct.chan3_scaled = buf.get_i16_le()?;
35138        __struct.chan4_scaled = buf.get_i16_le()?;
35139        __struct.chan5_scaled = buf.get_i16_le()?;
35140        __struct.chan6_scaled = buf.get_i16_le()?;
35141        __struct.chan7_scaled = buf.get_i16_le()?;
35142        __struct.chan8_scaled = buf.get_i16_le()?;
35143        __struct.port = buf.get_u8()?;
35144        __struct.rssi = buf.get_u8()?;
35145        Ok(__struct)
35146    }
35147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35148        let mut __tmp = BytesMut::new(bytes);
35149        #[allow(clippy::absurd_extreme_comparisons)]
35150        #[allow(unused_comparisons)]
35151        if __tmp.remaining() < Self::ENCODED_LEN {
35152            panic!(
35153                "buffer is too small (need {} bytes, but got {})",
35154                Self::ENCODED_LEN,
35155                __tmp.remaining(),
35156            )
35157        }
35158        __tmp.put_u32_le(self.time_boot_ms);
35159        __tmp.put_i16_le(self.chan1_scaled);
35160        __tmp.put_i16_le(self.chan2_scaled);
35161        __tmp.put_i16_le(self.chan3_scaled);
35162        __tmp.put_i16_le(self.chan4_scaled);
35163        __tmp.put_i16_le(self.chan5_scaled);
35164        __tmp.put_i16_le(self.chan6_scaled);
35165        __tmp.put_i16_le(self.chan7_scaled);
35166        __tmp.put_i16_le(self.chan8_scaled);
35167        __tmp.put_u8(self.port);
35168        __tmp.put_u8(self.rssi);
35169        if matches!(version, MavlinkVersion::V2) {
35170            let len = __tmp.len();
35171            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35172        } else {
35173            __tmp.len()
35174        }
35175    }
35176}
35177#[doc = "Send Status of each log block that autopilot board might have sent."]
35178#[doc = ""]
35179#[doc = "ID: 185"]
35180#[derive(Debug, Clone, PartialEq)]
35181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35183#[cfg_attr(feature = "ts", derive(TS))]
35184#[cfg_attr(feature = "ts", ts(export))]
35185pub struct REMOTE_LOG_BLOCK_STATUS_DATA {
35186    #[doc = "Log data block sequence number."]
35187    pub seqno: u32,
35188    #[doc = "System ID."]
35189    pub target_system: u8,
35190    #[doc = "Component ID."]
35191    pub target_component: u8,
35192    #[doc = "Log data block status."]
35193    pub status: MavRemoteLogDataBlockStatuses,
35194}
35195impl REMOTE_LOG_BLOCK_STATUS_DATA {
35196    pub const ENCODED_LEN: usize = 7usize;
35197    pub const DEFAULT: Self = Self {
35198        seqno: 0_u32,
35199        target_system: 0_u8,
35200        target_component: 0_u8,
35201        status: MavRemoteLogDataBlockStatuses::DEFAULT,
35202    };
35203    #[cfg(feature = "arbitrary")]
35204    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35205        use arbitrary::{Arbitrary, Unstructured};
35206        let mut buf = [0u8; 1024];
35207        rng.fill_bytes(&mut buf);
35208        let mut unstructured = Unstructured::new(&buf);
35209        Self::arbitrary(&mut unstructured).unwrap_or_default()
35210    }
35211}
35212impl Default for REMOTE_LOG_BLOCK_STATUS_DATA {
35213    fn default() -> Self {
35214        Self::DEFAULT.clone()
35215    }
35216}
35217impl MessageData for REMOTE_LOG_BLOCK_STATUS_DATA {
35218    type Message = MavMessage;
35219    const ID: u32 = 185u32;
35220    const NAME: &'static str = "REMOTE_LOG_BLOCK_STATUS";
35221    const EXTRA_CRC: u8 = 186u8;
35222    const ENCODED_LEN: usize = 7usize;
35223    fn deser(
35224        _version: MavlinkVersion,
35225        __input: &[u8],
35226    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35227        let avail_len = __input.len();
35228        let mut payload_buf = [0; Self::ENCODED_LEN];
35229        let mut buf = if avail_len < Self::ENCODED_LEN {
35230            payload_buf[0..avail_len].copy_from_slice(__input);
35231            Bytes::new(&payload_buf)
35232        } else {
35233            Bytes::new(__input)
35234        };
35235        let mut __struct = Self::default();
35236        __struct.seqno = buf.get_u32_le()?;
35237        __struct.target_system = buf.get_u8()?;
35238        __struct.target_component = buf.get_u8()?;
35239        let tmp = buf.get_u8()?;
35240        __struct.status =
35241            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
35242                enum_type: "MavRemoteLogDataBlockStatuses",
35243                value: tmp as u64,
35244            })?;
35245        Ok(__struct)
35246    }
35247    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35248        let mut __tmp = BytesMut::new(bytes);
35249        #[allow(clippy::absurd_extreme_comparisons)]
35250        #[allow(unused_comparisons)]
35251        if __tmp.remaining() < Self::ENCODED_LEN {
35252            panic!(
35253                "buffer is too small (need {} bytes, but got {})",
35254                Self::ENCODED_LEN,
35255                __tmp.remaining(),
35256            )
35257        }
35258        __tmp.put_u32_le(self.seqno);
35259        __tmp.put_u8(self.target_system);
35260        __tmp.put_u8(self.target_component);
35261        __tmp.put_u8(self.status as u8);
35262        if matches!(version, MavlinkVersion::V2) {
35263            let len = __tmp.len();
35264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35265        } else {
35266            __tmp.len()
35267        }
35268    }
35269}
35270#[doc = "Send a block of log data to remote location."]
35271#[doc = ""]
35272#[doc = "ID: 184"]
35273#[derive(Debug, Clone, PartialEq)]
35274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35276#[cfg_attr(feature = "ts", derive(TS))]
35277#[cfg_attr(feature = "ts", ts(export))]
35278pub struct REMOTE_LOG_DATA_BLOCK_DATA {
35279    #[doc = "Log data block sequence number."]
35280    pub seqno: MavRemoteLogDataBlockCommands,
35281    #[doc = "System ID."]
35282    pub target_system: u8,
35283    #[doc = "Component ID."]
35284    pub target_component: u8,
35285    #[doc = "Log data block."]
35286    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
35287    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
35288    pub data: [u8; 200],
35289}
35290impl REMOTE_LOG_DATA_BLOCK_DATA {
35291    pub const ENCODED_LEN: usize = 206usize;
35292    pub const DEFAULT: Self = Self {
35293        seqno: MavRemoteLogDataBlockCommands::DEFAULT,
35294        target_system: 0_u8,
35295        target_component: 0_u8,
35296        data: [0_u8; 200usize],
35297    };
35298    #[cfg(feature = "arbitrary")]
35299    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35300        use arbitrary::{Arbitrary, Unstructured};
35301        let mut buf = [0u8; 1024];
35302        rng.fill_bytes(&mut buf);
35303        let mut unstructured = Unstructured::new(&buf);
35304        Self::arbitrary(&mut unstructured).unwrap_or_default()
35305    }
35306}
35307impl Default for REMOTE_LOG_DATA_BLOCK_DATA {
35308    fn default() -> Self {
35309        Self::DEFAULT.clone()
35310    }
35311}
35312impl MessageData for REMOTE_LOG_DATA_BLOCK_DATA {
35313    type Message = MavMessage;
35314    const ID: u32 = 184u32;
35315    const NAME: &'static str = "REMOTE_LOG_DATA_BLOCK";
35316    const EXTRA_CRC: u8 = 159u8;
35317    const ENCODED_LEN: usize = 206usize;
35318    fn deser(
35319        _version: MavlinkVersion,
35320        __input: &[u8],
35321    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35322        let avail_len = __input.len();
35323        let mut payload_buf = [0; Self::ENCODED_LEN];
35324        let mut buf = if avail_len < Self::ENCODED_LEN {
35325            payload_buf[0..avail_len].copy_from_slice(__input);
35326            Bytes::new(&payload_buf)
35327        } else {
35328            Bytes::new(__input)
35329        };
35330        let mut __struct = Self::default();
35331        let tmp = buf.get_u32_le()?;
35332        __struct.seqno = FromPrimitive::from_u32(tmp).ok_or(
35333            ::mavlink_core::error::ParserError::InvalidEnum {
35334                enum_type: "MavRemoteLogDataBlockCommands",
35335                value: tmp as u64,
35336            },
35337        )?;
35338        __struct.target_system = buf.get_u8()?;
35339        __struct.target_component = buf.get_u8()?;
35340        for v in &mut __struct.data {
35341            let val = buf.get_u8()?;
35342            *v = val;
35343        }
35344        Ok(__struct)
35345    }
35346    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35347        let mut __tmp = BytesMut::new(bytes);
35348        #[allow(clippy::absurd_extreme_comparisons)]
35349        #[allow(unused_comparisons)]
35350        if __tmp.remaining() < Self::ENCODED_LEN {
35351            panic!(
35352                "buffer is too small (need {} bytes, but got {})",
35353                Self::ENCODED_LEN,
35354                __tmp.remaining(),
35355            )
35356        }
35357        __tmp.put_u32_le(self.seqno as u32);
35358        __tmp.put_u8(self.target_system);
35359        __tmp.put_u8(self.target_component);
35360        for val in &self.data {
35361            __tmp.put_u8(*val);
35362        }
35363        if matches!(version, MavlinkVersion::V2) {
35364            let len = __tmp.len();
35365            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35366        } else {
35367            __tmp.len()
35368        }
35369    }
35370}
35371#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
35372#[doc = "Request a data stream."]
35373#[doc = ""]
35374#[doc = "ID: 66"]
35375#[derive(Debug, Clone, PartialEq)]
35376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35378#[cfg_attr(feature = "ts", derive(TS))]
35379#[cfg_attr(feature = "ts", ts(export))]
35380pub struct REQUEST_DATA_STREAM_DATA {
35381    #[doc = "The requested message rate"]
35382    pub req_message_rate: u16,
35383    #[doc = "The target requested to send the message stream."]
35384    pub target_system: u8,
35385    #[doc = "The target requested to send the message stream."]
35386    pub target_component: u8,
35387    #[doc = "The ID of the requested data stream"]
35388    pub req_stream_id: u8,
35389    #[doc = "1 to start sending, 0 to stop sending."]
35390    pub start_stop: u8,
35391}
35392impl REQUEST_DATA_STREAM_DATA {
35393    pub const ENCODED_LEN: usize = 6usize;
35394    pub const DEFAULT: Self = Self {
35395        req_message_rate: 0_u16,
35396        target_system: 0_u8,
35397        target_component: 0_u8,
35398        req_stream_id: 0_u8,
35399        start_stop: 0_u8,
35400    };
35401    #[cfg(feature = "arbitrary")]
35402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35403        use arbitrary::{Arbitrary, Unstructured};
35404        let mut buf = [0u8; 1024];
35405        rng.fill_bytes(&mut buf);
35406        let mut unstructured = Unstructured::new(&buf);
35407        Self::arbitrary(&mut unstructured).unwrap_or_default()
35408    }
35409}
35410impl Default for REQUEST_DATA_STREAM_DATA {
35411    fn default() -> Self {
35412        Self::DEFAULT.clone()
35413    }
35414}
35415impl MessageData for REQUEST_DATA_STREAM_DATA {
35416    type Message = MavMessage;
35417    const ID: u32 = 66u32;
35418    const NAME: &'static str = "REQUEST_DATA_STREAM";
35419    const EXTRA_CRC: u8 = 148u8;
35420    const ENCODED_LEN: usize = 6usize;
35421    fn deser(
35422        _version: MavlinkVersion,
35423        __input: &[u8],
35424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35425        let avail_len = __input.len();
35426        let mut payload_buf = [0; Self::ENCODED_LEN];
35427        let mut buf = if avail_len < Self::ENCODED_LEN {
35428            payload_buf[0..avail_len].copy_from_slice(__input);
35429            Bytes::new(&payload_buf)
35430        } else {
35431            Bytes::new(__input)
35432        };
35433        let mut __struct = Self::default();
35434        __struct.req_message_rate = buf.get_u16_le()?;
35435        __struct.target_system = buf.get_u8()?;
35436        __struct.target_component = buf.get_u8()?;
35437        __struct.req_stream_id = buf.get_u8()?;
35438        __struct.start_stop = buf.get_u8()?;
35439        Ok(__struct)
35440    }
35441    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35442        let mut __tmp = BytesMut::new(bytes);
35443        #[allow(clippy::absurd_extreme_comparisons)]
35444        #[allow(unused_comparisons)]
35445        if __tmp.remaining() < Self::ENCODED_LEN {
35446            panic!(
35447                "buffer is too small (need {} bytes, but got {})",
35448                Self::ENCODED_LEN,
35449                __tmp.remaining(),
35450            )
35451        }
35452        __tmp.put_u16_le(self.req_message_rate);
35453        __tmp.put_u8(self.target_system);
35454        __tmp.put_u8(self.target_component);
35455        __tmp.put_u8(self.req_stream_id);
35456        __tmp.put_u8(self.start_stop);
35457        if matches!(version, MavlinkVersion::V2) {
35458            let len = __tmp.len();
35459            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35460        } else {
35461            __tmp.len()
35462        }
35463    }
35464}
35465#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
35466#[doc = ""]
35467#[doc = "ID: 412"]
35468#[derive(Debug, Clone, PartialEq)]
35469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35471#[cfg_attr(feature = "ts", derive(TS))]
35472#[cfg_attr(feature = "ts", ts(export))]
35473pub struct REQUEST_EVENT_DATA {
35474    #[doc = "First sequence number of the requested event."]
35475    pub first_sequence: u16,
35476    #[doc = "Last sequence number of the requested event."]
35477    pub last_sequence: u16,
35478    #[doc = "System ID"]
35479    pub target_system: u8,
35480    #[doc = "Component ID"]
35481    pub target_component: u8,
35482}
35483impl REQUEST_EVENT_DATA {
35484    pub const ENCODED_LEN: usize = 6usize;
35485    pub const DEFAULT: Self = Self {
35486        first_sequence: 0_u16,
35487        last_sequence: 0_u16,
35488        target_system: 0_u8,
35489        target_component: 0_u8,
35490    };
35491    #[cfg(feature = "arbitrary")]
35492    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35493        use arbitrary::{Arbitrary, Unstructured};
35494        let mut buf = [0u8; 1024];
35495        rng.fill_bytes(&mut buf);
35496        let mut unstructured = Unstructured::new(&buf);
35497        Self::arbitrary(&mut unstructured).unwrap_or_default()
35498    }
35499}
35500impl Default for REQUEST_EVENT_DATA {
35501    fn default() -> Self {
35502        Self::DEFAULT.clone()
35503    }
35504}
35505impl MessageData for REQUEST_EVENT_DATA {
35506    type Message = MavMessage;
35507    const ID: u32 = 412u32;
35508    const NAME: &'static str = "REQUEST_EVENT";
35509    const EXTRA_CRC: u8 = 33u8;
35510    const ENCODED_LEN: usize = 6usize;
35511    fn deser(
35512        _version: MavlinkVersion,
35513        __input: &[u8],
35514    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35515        let avail_len = __input.len();
35516        let mut payload_buf = [0; Self::ENCODED_LEN];
35517        let mut buf = if avail_len < Self::ENCODED_LEN {
35518            payload_buf[0..avail_len].copy_from_slice(__input);
35519            Bytes::new(&payload_buf)
35520        } else {
35521            Bytes::new(__input)
35522        };
35523        let mut __struct = Self::default();
35524        __struct.first_sequence = buf.get_u16_le()?;
35525        __struct.last_sequence = buf.get_u16_le()?;
35526        __struct.target_system = buf.get_u8()?;
35527        __struct.target_component = buf.get_u8()?;
35528        Ok(__struct)
35529    }
35530    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35531        let mut __tmp = BytesMut::new(bytes);
35532        #[allow(clippy::absurd_extreme_comparisons)]
35533        #[allow(unused_comparisons)]
35534        if __tmp.remaining() < Self::ENCODED_LEN {
35535            panic!(
35536                "buffer is too small (need {} bytes, but got {})",
35537                Self::ENCODED_LEN,
35538                __tmp.remaining(),
35539            )
35540        }
35541        __tmp.put_u16_le(self.first_sequence);
35542        __tmp.put_u16_le(self.last_sequence);
35543        __tmp.put_u8(self.target_system);
35544        __tmp.put_u8(self.target_component);
35545        if matches!(version, MavlinkVersion::V2) {
35546            let len = __tmp.len();
35547            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35548        } else {
35549            __tmp.len()
35550        }
35551    }
35552}
35553#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
35554#[doc = ""]
35555#[doc = "ID: 142"]
35556#[derive(Debug, Clone, PartialEq)]
35557#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35559#[cfg_attr(feature = "ts", derive(TS))]
35560#[cfg_attr(feature = "ts", ts(export))]
35561pub struct RESOURCE_REQUEST_DATA {
35562    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
35563    pub request_id: u8,
35564    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
35565    pub uri_type: u8,
35566    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
35567    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
35568    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
35569    pub uri: [u8; 120],
35570    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
35571    pub transfer_type: u8,
35572    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
35573    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
35574    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
35575    pub storage: [u8; 120],
35576}
35577impl RESOURCE_REQUEST_DATA {
35578    pub const ENCODED_LEN: usize = 243usize;
35579    pub const DEFAULT: Self = Self {
35580        request_id: 0_u8,
35581        uri_type: 0_u8,
35582        uri: [0_u8; 120usize],
35583        transfer_type: 0_u8,
35584        storage: [0_u8; 120usize],
35585    };
35586    #[cfg(feature = "arbitrary")]
35587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35588        use arbitrary::{Arbitrary, Unstructured};
35589        let mut buf = [0u8; 1024];
35590        rng.fill_bytes(&mut buf);
35591        let mut unstructured = Unstructured::new(&buf);
35592        Self::arbitrary(&mut unstructured).unwrap_or_default()
35593    }
35594}
35595impl Default for RESOURCE_REQUEST_DATA {
35596    fn default() -> Self {
35597        Self::DEFAULT.clone()
35598    }
35599}
35600impl MessageData for RESOURCE_REQUEST_DATA {
35601    type Message = MavMessage;
35602    const ID: u32 = 142u32;
35603    const NAME: &'static str = "RESOURCE_REQUEST";
35604    const EXTRA_CRC: u8 = 72u8;
35605    const ENCODED_LEN: usize = 243usize;
35606    fn deser(
35607        _version: MavlinkVersion,
35608        __input: &[u8],
35609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35610        let avail_len = __input.len();
35611        let mut payload_buf = [0; Self::ENCODED_LEN];
35612        let mut buf = if avail_len < Self::ENCODED_LEN {
35613            payload_buf[0..avail_len].copy_from_slice(__input);
35614            Bytes::new(&payload_buf)
35615        } else {
35616            Bytes::new(__input)
35617        };
35618        let mut __struct = Self::default();
35619        __struct.request_id = buf.get_u8()?;
35620        __struct.uri_type = buf.get_u8()?;
35621        for v in &mut __struct.uri {
35622            let val = buf.get_u8()?;
35623            *v = val;
35624        }
35625        __struct.transfer_type = buf.get_u8()?;
35626        for v in &mut __struct.storage {
35627            let val = buf.get_u8()?;
35628            *v = val;
35629        }
35630        Ok(__struct)
35631    }
35632    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35633        let mut __tmp = BytesMut::new(bytes);
35634        #[allow(clippy::absurd_extreme_comparisons)]
35635        #[allow(unused_comparisons)]
35636        if __tmp.remaining() < Self::ENCODED_LEN {
35637            panic!(
35638                "buffer is too small (need {} bytes, but got {})",
35639                Self::ENCODED_LEN,
35640                __tmp.remaining(),
35641            )
35642        }
35643        __tmp.put_u8(self.request_id);
35644        __tmp.put_u8(self.uri_type);
35645        for val in &self.uri {
35646            __tmp.put_u8(*val);
35647        }
35648        __tmp.put_u8(self.transfer_type);
35649        for val in &self.storage {
35650            __tmp.put_u8(*val);
35651        }
35652        if matches!(version, MavlinkVersion::V2) {
35653            let len = __tmp.len();
35654            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35655        } else {
35656            __tmp.len()
35657        }
35658    }
35659}
35660#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
35661#[doc = ""]
35662#[doc = "ID: 413"]
35663#[derive(Debug, Clone, PartialEq)]
35664#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35665#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35666#[cfg_attr(feature = "ts", derive(TS))]
35667#[cfg_attr(feature = "ts", ts(export))]
35668pub struct RESPONSE_EVENT_ERROR_DATA {
35669    #[doc = "Sequence number."]
35670    pub sequence: u16,
35671    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
35672    pub sequence_oldest_available: u16,
35673    #[doc = "System ID"]
35674    pub target_system: u8,
35675    #[doc = "Component ID"]
35676    pub target_component: u8,
35677    #[doc = "Error reason."]
35678    pub reason: MavEventErrorReason,
35679}
35680impl RESPONSE_EVENT_ERROR_DATA {
35681    pub const ENCODED_LEN: usize = 7usize;
35682    pub const DEFAULT: Self = Self {
35683        sequence: 0_u16,
35684        sequence_oldest_available: 0_u16,
35685        target_system: 0_u8,
35686        target_component: 0_u8,
35687        reason: MavEventErrorReason::DEFAULT,
35688    };
35689    #[cfg(feature = "arbitrary")]
35690    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35691        use arbitrary::{Arbitrary, Unstructured};
35692        let mut buf = [0u8; 1024];
35693        rng.fill_bytes(&mut buf);
35694        let mut unstructured = Unstructured::new(&buf);
35695        Self::arbitrary(&mut unstructured).unwrap_or_default()
35696    }
35697}
35698impl Default for RESPONSE_EVENT_ERROR_DATA {
35699    fn default() -> Self {
35700        Self::DEFAULT.clone()
35701    }
35702}
35703impl MessageData for RESPONSE_EVENT_ERROR_DATA {
35704    type Message = MavMessage;
35705    const ID: u32 = 413u32;
35706    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
35707    const EXTRA_CRC: u8 = 77u8;
35708    const ENCODED_LEN: usize = 7usize;
35709    fn deser(
35710        _version: MavlinkVersion,
35711        __input: &[u8],
35712    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35713        let avail_len = __input.len();
35714        let mut payload_buf = [0; Self::ENCODED_LEN];
35715        let mut buf = if avail_len < Self::ENCODED_LEN {
35716            payload_buf[0..avail_len].copy_from_slice(__input);
35717            Bytes::new(&payload_buf)
35718        } else {
35719            Bytes::new(__input)
35720        };
35721        let mut __struct = Self::default();
35722        __struct.sequence = buf.get_u16_le()?;
35723        __struct.sequence_oldest_available = buf.get_u16_le()?;
35724        __struct.target_system = buf.get_u8()?;
35725        __struct.target_component = buf.get_u8()?;
35726        let tmp = buf.get_u8()?;
35727        __struct.reason =
35728            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
35729                enum_type: "MavEventErrorReason",
35730                value: tmp as u64,
35731            })?;
35732        Ok(__struct)
35733    }
35734    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35735        let mut __tmp = BytesMut::new(bytes);
35736        #[allow(clippy::absurd_extreme_comparisons)]
35737        #[allow(unused_comparisons)]
35738        if __tmp.remaining() < Self::ENCODED_LEN {
35739            panic!(
35740                "buffer is too small (need {} bytes, but got {})",
35741                Self::ENCODED_LEN,
35742                __tmp.remaining(),
35743            )
35744        }
35745        __tmp.put_u16_le(self.sequence);
35746        __tmp.put_u16_le(self.sequence_oldest_available);
35747        __tmp.put_u8(self.target_system);
35748        __tmp.put_u8(self.target_component);
35749        __tmp.put_u8(self.reason as u8);
35750        if matches!(version, MavlinkVersion::V2) {
35751            let len = __tmp.len();
35752            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35753        } else {
35754            __tmp.len()
35755        }
35756    }
35757}
35758#[doc = "RPM sensor output."]
35759#[doc = ""]
35760#[doc = "ID: 226"]
35761#[derive(Debug, Clone, PartialEq)]
35762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35764#[cfg_attr(feature = "ts", derive(TS))]
35765#[cfg_attr(feature = "ts", ts(export))]
35766pub struct RPM_DATA {
35767    #[doc = "RPM Sensor1."]
35768    pub rpm1: f32,
35769    #[doc = "RPM Sensor2."]
35770    pub rpm2: f32,
35771}
35772impl RPM_DATA {
35773    pub const ENCODED_LEN: usize = 8usize;
35774    pub const DEFAULT: Self = Self {
35775        rpm1: 0.0_f32,
35776        rpm2: 0.0_f32,
35777    };
35778    #[cfg(feature = "arbitrary")]
35779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35780        use arbitrary::{Arbitrary, Unstructured};
35781        let mut buf = [0u8; 1024];
35782        rng.fill_bytes(&mut buf);
35783        let mut unstructured = Unstructured::new(&buf);
35784        Self::arbitrary(&mut unstructured).unwrap_or_default()
35785    }
35786}
35787impl Default for RPM_DATA {
35788    fn default() -> Self {
35789        Self::DEFAULT.clone()
35790    }
35791}
35792impl MessageData for RPM_DATA {
35793    type Message = MavMessage;
35794    const ID: u32 = 226u32;
35795    const NAME: &'static str = "RPM";
35796    const EXTRA_CRC: u8 = 207u8;
35797    const ENCODED_LEN: usize = 8usize;
35798    fn deser(
35799        _version: MavlinkVersion,
35800        __input: &[u8],
35801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35802        let avail_len = __input.len();
35803        let mut payload_buf = [0; Self::ENCODED_LEN];
35804        let mut buf = if avail_len < Self::ENCODED_LEN {
35805            payload_buf[0..avail_len].copy_from_slice(__input);
35806            Bytes::new(&payload_buf)
35807        } else {
35808            Bytes::new(__input)
35809        };
35810        let mut __struct = Self::default();
35811        __struct.rpm1 = buf.get_f32_le()?;
35812        __struct.rpm2 = buf.get_f32_le()?;
35813        Ok(__struct)
35814    }
35815    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35816        let mut __tmp = BytesMut::new(bytes);
35817        #[allow(clippy::absurd_extreme_comparisons)]
35818        #[allow(unused_comparisons)]
35819        if __tmp.remaining() < Self::ENCODED_LEN {
35820            panic!(
35821                "buffer is too small (need {} bytes, but got {})",
35822                Self::ENCODED_LEN,
35823                __tmp.remaining(),
35824            )
35825        }
35826        __tmp.put_f32_le(self.rpm1);
35827        __tmp.put_f32_le(self.rpm2);
35828        if matches!(version, MavlinkVersion::V2) {
35829            let len = __tmp.len();
35830            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35831        } else {
35832            __tmp.len()
35833        }
35834    }
35835}
35836#[doc = "Read out the safety zone the MAV currently assumes."]
35837#[doc = ""]
35838#[doc = "ID: 55"]
35839#[derive(Debug, Clone, PartialEq)]
35840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35842#[cfg_attr(feature = "ts", derive(TS))]
35843#[cfg_attr(feature = "ts", ts(export))]
35844pub struct SAFETY_ALLOWED_AREA_DATA {
35845    #[doc = "x position 1 / Latitude 1"]
35846    pub p1x: f32,
35847    #[doc = "y position 1 / Longitude 1"]
35848    pub p1y: f32,
35849    #[doc = "z position 1 / Altitude 1"]
35850    pub p1z: f32,
35851    #[doc = "x position 2 / Latitude 2"]
35852    pub p2x: f32,
35853    #[doc = "y position 2 / Longitude 2"]
35854    pub p2y: f32,
35855    #[doc = "z position 2 / Altitude 2"]
35856    pub p2z: f32,
35857    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
35858    pub frame: MavFrame,
35859}
35860impl SAFETY_ALLOWED_AREA_DATA {
35861    pub const ENCODED_LEN: usize = 25usize;
35862    pub const DEFAULT: Self = Self {
35863        p1x: 0.0_f32,
35864        p1y: 0.0_f32,
35865        p1z: 0.0_f32,
35866        p2x: 0.0_f32,
35867        p2y: 0.0_f32,
35868        p2z: 0.0_f32,
35869        frame: MavFrame::DEFAULT,
35870    };
35871    #[cfg(feature = "arbitrary")]
35872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35873        use arbitrary::{Arbitrary, Unstructured};
35874        let mut buf = [0u8; 1024];
35875        rng.fill_bytes(&mut buf);
35876        let mut unstructured = Unstructured::new(&buf);
35877        Self::arbitrary(&mut unstructured).unwrap_or_default()
35878    }
35879}
35880impl Default for SAFETY_ALLOWED_AREA_DATA {
35881    fn default() -> Self {
35882        Self::DEFAULT.clone()
35883    }
35884}
35885impl MessageData for SAFETY_ALLOWED_AREA_DATA {
35886    type Message = MavMessage;
35887    const ID: u32 = 55u32;
35888    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
35889    const EXTRA_CRC: u8 = 3u8;
35890    const ENCODED_LEN: usize = 25usize;
35891    fn deser(
35892        _version: MavlinkVersion,
35893        __input: &[u8],
35894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35895        let avail_len = __input.len();
35896        let mut payload_buf = [0; Self::ENCODED_LEN];
35897        let mut buf = if avail_len < Self::ENCODED_LEN {
35898            payload_buf[0..avail_len].copy_from_slice(__input);
35899            Bytes::new(&payload_buf)
35900        } else {
35901            Bytes::new(__input)
35902        };
35903        let mut __struct = Self::default();
35904        __struct.p1x = buf.get_f32_le()?;
35905        __struct.p1y = buf.get_f32_le()?;
35906        __struct.p1z = buf.get_f32_le()?;
35907        __struct.p2x = buf.get_f32_le()?;
35908        __struct.p2y = buf.get_f32_le()?;
35909        __struct.p2z = buf.get_f32_le()?;
35910        let tmp = buf.get_u8()?;
35911        __struct.frame =
35912            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
35913                enum_type: "MavFrame",
35914                value: tmp as u64,
35915            })?;
35916        Ok(__struct)
35917    }
35918    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35919        let mut __tmp = BytesMut::new(bytes);
35920        #[allow(clippy::absurd_extreme_comparisons)]
35921        #[allow(unused_comparisons)]
35922        if __tmp.remaining() < Self::ENCODED_LEN {
35923            panic!(
35924                "buffer is too small (need {} bytes, but got {})",
35925                Self::ENCODED_LEN,
35926                __tmp.remaining(),
35927            )
35928        }
35929        __tmp.put_f32_le(self.p1x);
35930        __tmp.put_f32_le(self.p1y);
35931        __tmp.put_f32_le(self.p1z);
35932        __tmp.put_f32_le(self.p2x);
35933        __tmp.put_f32_le(self.p2y);
35934        __tmp.put_f32_le(self.p2z);
35935        __tmp.put_u8(self.frame as u8);
35936        if matches!(version, MavlinkVersion::V2) {
35937            let len = __tmp.len();
35938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35939        } else {
35940            __tmp.len()
35941        }
35942    }
35943}
35944#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
35945#[doc = ""]
35946#[doc = "ID: 54"]
35947#[derive(Debug, Clone, PartialEq)]
35948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35950#[cfg_attr(feature = "ts", derive(TS))]
35951#[cfg_attr(feature = "ts", ts(export))]
35952pub struct SAFETY_SET_ALLOWED_AREA_DATA {
35953    #[doc = "x position 1 / Latitude 1"]
35954    pub p1x: f32,
35955    #[doc = "y position 1 / Longitude 1"]
35956    pub p1y: f32,
35957    #[doc = "z position 1 / Altitude 1"]
35958    pub p1z: f32,
35959    #[doc = "x position 2 / Latitude 2"]
35960    pub p2x: f32,
35961    #[doc = "y position 2 / Longitude 2"]
35962    pub p2y: f32,
35963    #[doc = "z position 2 / Altitude 2"]
35964    pub p2z: f32,
35965    #[doc = "System ID"]
35966    pub target_system: u8,
35967    #[doc = "Component ID"]
35968    pub target_component: u8,
35969    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
35970    pub frame: MavFrame,
35971}
35972impl SAFETY_SET_ALLOWED_AREA_DATA {
35973    pub const ENCODED_LEN: usize = 27usize;
35974    pub const DEFAULT: Self = Self {
35975        p1x: 0.0_f32,
35976        p1y: 0.0_f32,
35977        p1z: 0.0_f32,
35978        p2x: 0.0_f32,
35979        p2y: 0.0_f32,
35980        p2z: 0.0_f32,
35981        target_system: 0_u8,
35982        target_component: 0_u8,
35983        frame: MavFrame::DEFAULT,
35984    };
35985    #[cfg(feature = "arbitrary")]
35986    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35987        use arbitrary::{Arbitrary, Unstructured};
35988        let mut buf = [0u8; 1024];
35989        rng.fill_bytes(&mut buf);
35990        let mut unstructured = Unstructured::new(&buf);
35991        Self::arbitrary(&mut unstructured).unwrap_or_default()
35992    }
35993}
35994impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
35995    fn default() -> Self {
35996        Self::DEFAULT.clone()
35997    }
35998}
35999impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
36000    type Message = MavMessage;
36001    const ID: u32 = 54u32;
36002    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
36003    const EXTRA_CRC: u8 = 15u8;
36004    const ENCODED_LEN: usize = 27usize;
36005    fn deser(
36006        _version: MavlinkVersion,
36007        __input: &[u8],
36008    ) -> Result<Self, ::mavlink_core::error::ParserError> {
36009        let avail_len = __input.len();
36010        let mut payload_buf = [0; Self::ENCODED_LEN];
36011        let mut buf = if avail_len < Self::ENCODED_LEN {
36012            payload_buf[0..avail_len].copy_from_slice(__input);
36013            Bytes::new(&payload_buf)
36014        } else {
36015            Bytes::new(__input)
36016        };
36017        let mut __struct = Self::default();
36018        __struct.p1x = buf.get_f32_le()?;
36019        __struct.p1y = buf.get_f32_le()?;
36020        __struct.p1z = buf.get_f32_le()?;
36021        __struct.p2x = buf.get_f32_le()?;
36022        __struct.p2y = buf.get_f32_le()?;
36023        __struct.p2z = buf.get_f32_le()?;
36024        __struct.target_system = buf.get_u8()?;
36025        __struct.target_component = buf.get_u8()?;
36026        let tmp = buf.get_u8()?;
36027        __struct.frame =
36028            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
36029                enum_type: "MavFrame",
36030                value: tmp as u64,
36031            })?;
36032        Ok(__struct)
36033    }
36034    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36035        let mut __tmp = BytesMut::new(bytes);
36036        #[allow(clippy::absurd_extreme_comparisons)]
36037        #[allow(unused_comparisons)]
36038        if __tmp.remaining() < Self::ENCODED_LEN {
36039            panic!(
36040                "buffer is too small (need {} bytes, but got {})",
36041                Self::ENCODED_LEN,
36042                __tmp.remaining(),
36043            )
36044        }
36045        __tmp.put_f32_le(self.p1x);
36046        __tmp.put_f32_le(self.p1y);
36047        __tmp.put_f32_le(self.p1z);
36048        __tmp.put_f32_le(self.p2x);
36049        __tmp.put_f32_le(self.p2y);
36050        __tmp.put_f32_le(self.p2z);
36051        __tmp.put_u8(self.target_system);
36052        __tmp.put_u8(self.target_component);
36053        __tmp.put_u8(self.frame as u8);
36054        if matches!(version, MavlinkVersion::V2) {
36055            let len = __tmp.len();
36056            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
36057        } else {
36058            __tmp.len()
36059        }
36060    }
36061}
36062#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
36063#[doc = ""]
36064#[doc = "ID: 26"]
36065#[derive(Debug, Clone, PartialEq)]
36066#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
36067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
36068#[cfg_attr(feature = "ts", derive(TS))]
36069#[cfg_attr(feature = "ts", ts(export))]
36070pub struct SCALED_IMU_DATA {
36071    #[doc = "Timestamp (time since system boot)."]
36072    pub time_boot_ms: u32,
36073    #[doc = "X acceleration"]
36074    pub xacc: i16,
36075    #[doc = "Y acceleration"]
36076    pub yacc: i16,
36077    #[doc = "Z acceleration"]
36078    pub zacc: i16,
36079    #[doc = "Angular speed around X axis"]
36080    pub xgyro: i16,
36081    #[doc = "Angular speed around Y axis"]
36082    pub ygyro: i16,
36083    #[doc = "Angular speed around Z axis"]
36084    pub zgyro: i16,
36085    #[doc = "X Magnetic field"]
36086    pub xmag: i16,
36087    #[doc = "Y Magnetic field"]
36088    pub ymag: i16,
36089    #[doc = "Z Magnetic field"]
36090    pub zmag: i16,
36091    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
36092    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
36093    pub temperature: i16,
36094}
36095impl SCALED_IMU_DATA {
36096    pub const ENCODED_LEN: usize = 24usize;
36097    pub const DEFAULT: Self = Self {
36098        time_boot_ms: 0_u32,
36099        xacc: 0_i16,
36100        yacc: 0_i16,
36101        zacc: 0_i16,
36102        xgyro: 0_i16,
36103        ygyro: 0_i16,
36104        zgyro: 0_i16,
36105        xmag: 0_i16,
36106        ymag: 0_i16,
36107        zmag: 0_i16,
36108        temperature: 0_i16,
36109    };
36110    #[cfg(feature = "arbitrary")]
36111    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
36112        use arbitrary::{Arbitrary, Unstructured};
36113        let mut buf = [0u8; 1024];
36114        rng.fill_bytes(&mut buf);
36115        let mut unstructured = Unstructured::new(&buf);
36116        Self::arbitrary(&mut unstructured).unwrap_or_default()
36117    }
36118}
36119impl Default for SCALED_IMU_DATA {
36120    fn default() -> Self {
36121        Self::DEFAULT.clone()
36122    }
36123}
36124impl MessageData for SCALED_IMU_DATA {
36125    type Message = MavMessage;
36126    const ID: u32 = 26u32;
36127    const NAME: &'static str = "SCALED_IMU";
36128    const EXTRA_CRC: u8 = 170u8;
36129    const ENCODED_LEN: usize = 24usize;
36130    fn deser(
36131        _version: MavlinkVersion,
36132        __input: &[u8],
36133    ) -> Result<Self, ::mavlink_core::error::ParserError> {
36134        let avail_len = __input.len();
36135        let mut payload_buf = [0; Self::ENCODED_LEN];
36136        let mut buf = if avail_len < Self::ENCODED_LEN {
36137            payload_buf[0..avail_len].copy_from_slice(__input);
36138            Bytes::new(&payload_buf)
36139        } else {
36140            Bytes::new(__input)
36141        };
36142        let mut __struct = Self::default();
36143        __struct.time_boot_ms = buf.get_u32_le()?;
36144        __struct.xacc = buf.get_i16_le()?;
36145        __struct.yacc = buf.get_i16_le()?;
36146        __struct.zacc = buf.get_i16_le()?;
36147        __struct.xgyro = buf.get_i16_le()?;
36148        __struct.ygyro = buf.get_i16_le()?;
36149        __struct.zgyro = buf.get_i16_le()?;
36150        __struct.xmag = buf.get_i16_le()?;
36151        __struct.ymag = buf.get_i16_le()?;
36152        __struct.zmag = buf.get_i16_le()?;
36153        __struct.temperature = buf.get_i16_le()?;
36154        Ok(__struct)
36155    }
36156    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36157        let mut __tmp = BytesMut::new(bytes);
36158        #[allow(clippy::absurd_extreme_comparisons)]
36159        #[allow(unused_comparisons)]
36160        if __tmp.remaining() < Self::ENCODED_LEN {
36161            panic!(
36162                "buffer is too small (need {} bytes, but got {})",
36163                Self::ENCODED_LEN,
36164                __tmp.remaining(),
36165            )
36166        }
36167        __tmp.put_u32_le(self.time_boot_ms);
36168        __tmp.put_i16_le(self.xacc);
36169        __tmp.put_i16_le(self.yacc);
36170        __tmp.put_i16_le(self.zacc);
36171        __tmp.put_i16_le(self.xgyro);
36172        __tmp.put_i16_le(self.ygyro);
36173        __tmp.put_i16_le(self.zgyro);
36174        __tmp.put_i16_le(self.xmag);
36175        __tmp.put_i16_le(self.ymag);
36176        __tmp.put_i16_le(self.zmag);
36177        if matches!(version, MavlinkVersion::V2) {
36178            __tmp.put_i16_le(self.temperature);
36179            let len = __tmp.len();
36180            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
36181        } else {
36182            __tmp.len()
36183        }
36184    }
36185}
36186#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
36187#[doc = ""]
36188#[doc = "ID: 116"]
36189#[derive(Debug, Clone, PartialEq)]
36190#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
36191#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
36192#[cfg_attr(feature = "ts", derive(TS))]
36193#[cfg_attr(feature = "ts", ts(export))]
36194pub struct SCALED_IMU2_DATA {
36195    #[doc = "Timestamp (time since system boot)."]
36196    pub time_boot_ms: u32,
36197    #[doc = "X acceleration"]
36198    pub xacc: i16,
36199    #[doc = "Y acceleration"]
36200    pub yacc: i16,
36201    #[doc = "Z acceleration"]
36202    pub zacc: i16,
36203    #[doc = "Angular speed around X axis"]
36204    pub xgyro: i16,
36205    #[doc = "Angular speed around Y axis"]
36206    pub ygyro: i16,
36207    #[doc = "Angular speed around Z axis"]
36208    pub zgyro: i16,
36209    #[doc = "X Magnetic field"]
36210    pub xmag: i16,
36211    #[doc = "Y Magnetic field"]
36212    pub ymag: i16,
36213    #[doc = "Z Magnetic field"]
36214    pub zmag: i16,
36215    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
36216    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
36217    pub temperature: i16,
36218}
36219impl SCALED_IMU2_DATA {
36220    pub const ENCODED_LEN: usize = 24usize;
36221    pub const DEFAULT: Self = Self {
36222        time_boot_ms: 0_u32,
36223        xacc: 0_i16,
36224        yacc: 0_i16,
36225        zacc: 0_i16,
36226        xgyro: 0_i16,
36227        ygyro: 0_i16,
36228        zgyro: 0_i16,
36229        xmag: 0_i16,
36230        ymag: 0_i16,
36231        zmag: 0_i16,
36232        temperature: 0_i16,
36233    };
36234    #[cfg(feature = "arbitrary")]
36235    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
36236        use arbitrary::{Arbitrary, Unstructured};
36237        let mut buf = [0u8; 1024];
36238        rng.fill_bytes(&mut buf);
36239        let mut unstructured = Unstructured::new(&buf);
36240        Self::arbitrary(&mut unstructured).unwrap_or_default()
36241    }
36242}
36243impl Default for SCALED_IMU2_DATA {
36244    fn default() -> Self {
36245        Self::DEFAULT.clone()
36246    }
36247}
36248impl MessageData for SCALED_IMU2_DATA {
36249    type Message = MavMessage;
36250    const ID: u32 = 116u32;
36251    const NAME: &'static str = "SCALED_IMU2";
36252    const EXTRA_CRC: u8 = 76u8;
36253    const ENCODED_LEN: usize = 24usize;
36254    fn deser(
36255        _version: MavlinkVersion,
36256        __input: &[u8],
36257    ) -> Result<Self, ::mavlink_core::error::ParserError> {
36258        let avail_len = __input.len();
36259        let mut payload_buf = [0; Self::ENCODED_LEN];
36260        let mut buf = if avail_len < Self::ENCODED_LEN {
36261            payload_buf[0..avail_len].copy_from_slice(__input);
36262            Bytes::new(&payload_buf)
36263        } else {
36264            Bytes::new(__input)
36265        };
36266        let mut __struct = Self::default();
36267        __struct.time_boot_ms = buf.get_u32_le()?;
36268        __struct.xacc = buf.get_i16_le()?;
36269        __struct.yacc = buf.get_i16_le()?;
36270        __struct.zacc = buf.get_i16_le()?;
36271        __struct.xgyro = buf.get_i16_le()?;
36272        __struct.ygyro = buf.get_i16_le()?;
36273        __struct.zgyro = buf.get_i16_le()?;
36274        __struct.xmag = buf.get_i16_le()?;
36275        __struct.ymag = buf.get_i16_le()?;
36276        __struct.zmag = buf.get_i16_le()?;
36277        __struct.temperature = buf.get_i16_le()?;
36278        Ok(__struct)
36279    }
36280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36281        let mut __tmp = BytesMut::new(bytes);
36282        #[allow(clippy::absurd_extreme_comparisons)]
36283        #[allow(unused_comparisons)]
36284        if __tmp.remaining() < Self::ENCODED_LEN {
36285            panic!(
36286                "buffer is too small (need {} bytes, but got {})",
36287                Self::ENCODED_LEN,
36288                __tmp.remaining(),
36289            )
36290        }
36291        __tmp.put_u32_le(self.time_boot_ms);
36292        __tmp.put_i16_le(self.xacc);
36293        __tmp.put_i16_le(self.yacc);
36294        __tmp.put_i16_le(self.zacc);
36295        __tmp.put_i16_le(self.xgyro);
36296        __tmp.put_i16_le(self.ygyro);
36297        __tmp.put_i16_le(self.zgyro);
36298        __tmp.put_i16_le(self.xmag);
36299        __tmp.put_i16_le(self.ymag);
36300        __tmp.put_i16_le(self.zmag);
36301        if matches!(version, MavlinkVersion::V2) {
36302            __tmp.put_i16_le(self.temperature);
36303            let len = __tmp.len();
36304            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
36305        } else {
36306            __tmp.len()
36307        }
36308    }
36309}
36310#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
36311#[doc = ""]
36312#[doc = "ID: 129"]
36313#[derive(Debug, Clone, PartialEq)]
36314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
36315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
36316#[cfg_attr(feature = "ts", derive(TS))]
36317#[cfg_attr(feature = "ts", ts(export))]
36318pub struct SCALED_IMU3_DATA {
36319    #[doc = "Timestamp (time since system boot)."]
36320    pub time_boot_ms: u32,
36321    #[doc = "X acceleration"]
36322    pub xacc: i16,
36323    #[doc = "Y acceleration"]
36324    pub yacc: i16,
36325    #[doc = "Z acceleration"]
36326    pub zacc: i16,
36327    #[doc = "Angular speed around X axis"]
36328    pub xgyro: i16,
36329    #[doc = "Angular speed around Y axis"]
36330    pub ygyro: i16,
36331    #[doc = "Angular speed around Z axis"]
36332    pub zgyro: i16,
36333    #[doc = "X Magnetic field"]
36334    pub xmag: i16,
36335    #[doc = "Y Magnetic field"]
36336    pub ymag: i16,
36337    #[doc = "Z Magnetic field"]
36338    pub zmag: i16,
36339    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
36340    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
36341    pub temperature: i16,
36342}
36343impl SCALED_IMU3_DATA {
36344    pub const ENCODED_LEN: usize = 24usize;
36345    pub const DEFAULT: Self = Self {
36346        time_boot_ms: 0_u32,
36347        xacc: 0_i16,
36348        yacc: 0_i16,
36349        zacc: 0_i16,
36350        xgyro: 0_i16,
36351        ygyro: 0_i16,
36352        zgyro: 0_i16,
36353        xmag: 0_i16,
36354        ymag: 0_i16,
36355        zmag: 0_i16,
36356        temperature: 0_i16,
36357    };
36358    #[cfg(feature = "arbitrary")]
36359    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
36360        use arbitrary::{Arbitrary, Unstructured};
36361        let mut buf = [0u8; 1024];
36362        rng.fill_bytes(&mut buf);
36363        let mut unstructured = Unstructured::new(&buf);
36364        Self::arbitrary(&mut unstructured).unwrap_or_default()
36365    }
36366}
36367impl Default for SCALED_IMU3_DATA {
36368    fn default() -> Self {
36369        Self::DEFAULT.clone()
36370    }
36371}
36372impl MessageData for SCALED_IMU3_DATA {
36373    type Message = MavMessage;
36374    const ID: u32 = 129u32;
36375    const NAME: &'static str = "SCALED_IMU3";
36376    const EXTRA_CRC: u8 = 46u8;
36377    const ENCODED_LEN: usize = 24usize;
36378    fn deser(
36379        _version: MavlinkVersion,
36380        __input: &[u8],
36381    ) -> Result<Self, ::mavlink_core::error::ParserError> {
36382        let avail_len = __input.len();
36383        let mut payload_buf = [0; Self::ENCODED_LEN];
36384        let mut buf = if avail_len < Self::ENCODED_LEN {
36385            payload_buf[0..avail_len].copy_from_slice(__input);
36386            Bytes::new(&payload_buf)
36387        } else {
36388            Bytes::new(__input)
36389        };
36390        let mut __struct = Self::default();
36391        __struct.time_boot_ms = buf.get_u32_le()?;
36392        __struct.xacc = buf.get_i16_le()?;
36393        __struct.yacc = buf.get_i16_le()?;
36394        __struct.zacc = buf.get_i16_le()?;
36395        __struct.xgyro = buf.get_i16_le()?;
36396        __struct.ygyro = buf.get_i16_le()?;
36397        __struct.zgyro = buf.get_i16_le()?;
36398        __struct.xmag = buf.get_i16_le()?;
36399        __struct.ymag = buf.get_i16_le()?;
36400        __struct.zmag = buf.get_i16_le()?;
36401        __struct.temperature = buf.get_i16_le()?;
36402        Ok(__struct)
36403    }
36404    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36405        let mut __tmp = BytesMut::new(bytes);
36406        #[allow(clippy::absurd_extreme_comparisons)]
36407        #[allow(unused_comparisons)]
36408        if __tmp.remaining() < Self::ENCODED_LEN {
36409            panic!(
36410                "buffer is too small (need {} bytes, but got {})",
36411                Self::ENCODED_LEN,
36412                __tmp.remaining(),
36413            )
36414        }
36415        __tmp.put_u32_le(self.time_boot_ms);
36416        __tmp.put_i16_le(self.xacc);
36417        __tmp.put_i16_le(self.yacc);
36418        __tmp.put_i16_le(self.zacc);
36419        __tmp.put_i16_le(self.xgyro);
36420        __tmp.put_i16_le(self.ygyro);
36421        __tmp.put_i16_le(self.zgyro);
36422        __tmp.put_i16_le(self.xmag);
36423        __tmp.put_i16_le(self.ymag);
36424        __tmp.put_i16_le(self.zmag);
36425        if matches!(version, MavlinkVersion::V2) {
36426            __tmp.put_i16_le(self.temperature);
36427            let len = __tmp.len();
36428            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
36429        } else {
36430            __tmp.len()
36431        }
36432    }
36433}
36434#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
36435#[doc = ""]
36436#[doc = "ID: 29"]
36437#[derive(Debug, Clone, PartialEq)]
36438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
36439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
36440#[cfg_attr(feature = "ts", derive(TS))]
36441#[cfg_attr(feature = "ts", ts(export))]
36442pub struct SCALED_PRESSURE_DATA {
36443    #[doc = "Timestamp (time since system boot)."]
36444    pub time_boot_ms: u32,
36445    #[doc = "Absolute pressure"]
36446    pub press_abs: f32,
36447    #[doc = "Differential pressure 1"]
36448    pub press_diff: f32,
36449    #[doc = "Absolute pressure temperature"]
36450    pub temperature: i16,
36451    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
36452    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
36453    pub temperature_press_diff: i16,
36454}
36455impl SCALED_PRESSURE_DATA {
36456    pub const ENCODED_LEN: usize = 16usize;
36457    pub const DEFAULT: Self = Self {
36458        time_boot_ms: 0_u32,
36459        press_abs: 0.0_f32,
36460        press_diff: 0.0_f32,
36461        temperature: 0_i16,
36462        temperature_press_diff: 0_i16,
36463    };
36464    #[cfg(feature = "arbitrary")]
36465    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
36466        use arbitrary::{Arbitrary, Unstructured};
36467        let mut buf = [0u8; 1024];
36468        rng.fill_bytes(&mut buf);
36469        let mut unstructured = Unstructured::new(&buf);
36470        Self::arbitrary(&mut unstructured).unwrap_or_default()
36471    }
36472}
36473impl Default for SCALED_PRESSURE_DATA {
36474    fn default() -> Self {
36475        Self::DEFAULT.clone()
36476    }
36477}
36478impl MessageData for SCALED_PRESSURE_DATA {
36479    type Message = MavMessage;
36480    const ID: u32 = 29u32;
36481    const NAME: &'static str = "SCALED_PRESSURE";
36482    const EXTRA_CRC: u8 = 115u8;
36483    const ENCODED_LEN: usize = 16usize;
36484    fn deser(
36485        _version: MavlinkVersion,
36486        __input: &[u8],
36487    ) -> Result<Self, ::mavlink_core::error::ParserError> {
36488        let avail_len = __input.len();
36489        let mut payload_buf = [0; Self::ENCODED_LEN];
36490        let mut buf = if avail_len < Self::ENCODED_LEN {
36491            payload_buf[0..avail_len].copy_from_slice(__input);
36492            Bytes::new(&payload_buf)
36493        } else {
36494            Bytes::new(__input)
36495        };
36496        let mut __struct = Self::default();
36497        __struct.time_boot_ms = buf.get_u32_le()?;
36498        __struct.press_abs = buf.get_f32_le()?;
36499        __struct.press_diff = buf.get_f32_le()?;
36500        __struct.temperature = buf.get_i16_le()?;
36501        __struct.temperature_press_diff = buf.get_i16_le()?;
36502        Ok(__struct)
36503    }
36504    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36505        let mut __tmp = BytesMut::new(bytes);
36506        #[allow(clippy::absurd_extreme_comparisons)]
36507        #[allow(unused_comparisons)]
36508        if __tmp.remaining() < Self::ENCODED_LEN {
36509            panic!(
36510                "buffer is too small (need {} bytes, but got {})",
36511                Self::ENCODED_LEN,
36512                __tmp.remaining(),
36513            )
36514        }
36515        __tmp.put_u32_le(self.time_boot_ms);
36516        __tmp.put_f32_le(self.press_abs);
36517        __tmp.put_f32_le(self.press_diff);
36518        __tmp.put_i16_le(self.temperature);
36519        if matches!(version, MavlinkVersion::V2) {
36520            __tmp.put_i16_le(self.temperature_press_diff);
36521            let len = __tmp.len();
36522            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
36523        } else {
36524            __tmp.len()
36525        }
36526    }
36527}
36528#[doc = "Barometer readings for 2nd barometer."]
36529#[doc = ""]
36530#[doc = "ID: 137"]
36531#[derive(Debug, Clone, PartialEq)]
36532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
36533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
36534#[cfg_attr(feature = "ts", derive(TS))]
36535#[cfg_attr(feature = "ts", ts(export))]
36536pub struct SCALED_PRESSURE2_DATA {
36537    #[doc = "Timestamp (time since system boot)."]
36538    pub time_boot_ms: u32,
36539    #[doc = "Absolute pressure"]
36540    pub press_abs: f32,
36541    #[doc = "Differential pressure"]
36542    pub press_diff: f32,
36543    #[doc = "Absolute pressure temperature"]
36544    pub temperature: i16,
36545    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
36546    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
36547    pub temperature_press_diff: i16,
36548}
36549impl SCALED_PRESSURE2_DATA {
36550    pub const ENCODED_LEN: usize = 16usize;
36551    pub const DEFAULT: Self = Self {
36552        time_boot_ms: 0_u32,
36553        press_abs: 0.0_f32,
36554        press_diff: 0.0_f32,
36555        temperature: 0_i16,
36556        temperature_press_diff: 0_i16,
36557    };
36558    #[cfg(feature = "arbitrary")]
36559    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
36560        use arbitrary::{Arbitrary, Unstructured};
36561        let mut buf = [0u8; 1024];
36562        rng.fill_bytes(&mut buf);
36563        let mut unstructured = Unstructured::new(&buf);
36564        Self::arbitrary(&mut unstructured).unwrap_or_default()
36565    }
36566}
36567impl Default for SCALED_PRESSURE2_DATA {
36568    fn default() -> Self {
36569        Self::DEFAULT.clone()
36570    }
36571}
36572impl MessageData for SCALED_PRESSURE2_DATA {
36573    type Message = MavMessage;
36574    const ID: u32 = 137u32;
36575    const NAME: &'static str = "SCALED_PRESSURE2";
36576    const EXTRA_CRC: u8 = 195u8;
36577    const ENCODED_LEN: usize = 16usize;
36578    fn deser(
36579        _version: MavlinkVersion,
36580        __input: &[u8],
36581    ) -> Result<Self, ::mavlink_core::error::ParserError> {
36582        let avail_len = __input.len();
36583        let mut payload_buf = [0; Self::ENCODED_LEN];
36584        let mut buf = if avail_len < Self::ENCODED_LEN {
36585            payload_buf[0..avail_len].copy_from_slice(__input);
36586            Bytes::new(&payload_buf)
36587        } else {
36588            Bytes::new(__input)
36589        };
36590        let mut __struct = Self::default();
36591        __struct.time_boot_ms = buf.get_u32_le()?;
36592        __struct.press_abs = buf.get_f32_le()?;
36593        __struct.press_diff = buf.get_f32_le()?;
36594        __struct.temperature = buf.get_i16_le()?;
36595        __struct.temperature_press_diff = buf.get_i16_le()?;
36596        Ok(__struct)
36597    }
36598    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36599        let mut __tmp = BytesMut::new(bytes);
36600        #[allow(clippy::absurd_extreme_comparisons)]
36601        #[allow(unused_comparisons)]
36602        if __tmp.remaining() < Self::ENCODED_LEN {
36603            panic!(
36604                "buffer is too small (need {} bytes, but got {})",
36605                Self::ENCODED_LEN,
36606                __tmp.remaining(),
36607            )
36608        }
36609        __tmp.put_u32_le(self.time_boot_ms);
36610        __tmp.put_f32_le(self.press_abs);
36611        __tmp.put_f32_le(self.press_diff);
36612        __tmp.put_i16_le(self.temperature);
36613        if matches!(version, MavlinkVersion::V2) {
36614            __tmp.put_i16_le(self.temperature_press_diff);
36615            let len = __tmp.len();
36616            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
36617        } else {
36618            __tmp.len()
36619        }
36620    }
36621}
36622#[doc = "Barometer readings for 3rd barometer."]
36623#[doc = ""]
36624#[doc = "ID: 143"]
36625#[derive(Debug, Clone, PartialEq)]
36626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
36627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
36628#[cfg_attr(feature = "ts", derive(TS))]
36629#[cfg_attr(feature = "ts", ts(export))]
36630pub struct SCALED_PRESSURE3_DATA {
36631    #[doc = "Timestamp (time since system boot)."]
36632    pub time_boot_ms: u32,
36633    #[doc = "Absolute pressure"]
36634    pub press_abs: f32,
36635    #[doc = "Differential pressure"]
36636    pub press_diff: f32,
36637    #[doc = "Absolute pressure temperature"]
36638    pub temperature: i16,
36639    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
36640    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
36641    pub temperature_press_diff: i16,
36642}
36643impl SCALED_PRESSURE3_DATA {
36644    pub const ENCODED_LEN: usize = 16usize;
36645    pub const DEFAULT: Self = Self {
36646        time_boot_ms: 0_u32,
36647        press_abs: 0.0_f32,
36648        press_diff: 0.0_f32,
36649        temperature: 0_i16,
36650        temperature_press_diff: 0_i16,
36651    };
36652    #[cfg(feature = "arbitrary")]
36653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
36654        use arbitrary::{Arbitrary, Unstructured};
36655        let mut buf = [0u8; 1024];
36656        rng.fill_bytes(&mut buf);
36657        let mut unstructured = Unstructured::new(&buf);
36658        Self::arbitrary(&mut unstructured).unwrap_or_default()
36659    }
36660}
36661impl Default for SCALED_PRESSURE3_DATA {
36662    fn default() -> Self {
36663        Self::DEFAULT.clone()
36664    }
36665}
36666impl MessageData for SCALED_PRESSURE3_DATA {
36667    type Message = MavMessage;
36668    const ID: u32 = 143u32;
36669    const NAME: &'static str = "SCALED_PRESSURE3";
36670    const EXTRA_CRC: u8 = 131u8;
36671    const ENCODED_LEN: usize = 16usize;
36672    fn deser(
36673        _version: MavlinkVersion,
36674        __input: &[u8],
36675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
36676        let avail_len = __input.len();
36677        let mut payload_buf = [0; Self::ENCODED_LEN];
36678        let mut buf = if avail_len < Self::ENCODED_LEN {
36679            payload_buf[0..avail_len].copy_from_slice(__input);
36680            Bytes::new(&payload_buf)
36681        } else {
36682            Bytes::new(__input)
36683        };
36684        let mut __struct = Self::default();
36685        __struct.time_boot_ms = buf.get_u32_le()?;
36686        __struct.press_abs = buf.get_f32_le()?;
36687        __struct.press_diff = buf.get_f32_le()?;
36688        __struct.temperature = buf.get_i16_le()?;
36689        __struct.temperature_press_diff = buf.get_i16_le()?;
36690        Ok(__struct)
36691    }
36692    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36693        let mut __tmp = BytesMut::new(bytes);
36694        #[allow(clippy::absurd_extreme_comparisons)]
36695        #[allow(unused_comparisons)]
36696        if __tmp.remaining() < Self::ENCODED_LEN {
36697            panic!(
36698                "buffer is too small (need {} bytes, but got {})",
36699                Self::ENCODED_LEN,
36700                __tmp.remaining(),
36701            )
36702        }
36703        __tmp.put_u32_le(self.time_boot_ms);
36704        __tmp.put_f32_le(self.press_abs);
36705        __tmp.put_f32_le(self.press_diff);
36706        __tmp.put_i16_le(self.temperature);
36707        if matches!(version, MavlinkVersion::V2) {
36708            __tmp.put_i16_le(self.temperature_press_diff);
36709            let len = __tmp.len();
36710            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
36711        } else {
36712            __tmp.len()
36713        }
36714    }
36715}
36716#[doc = "Send a secure command. Data should be signed with a private key corresponding with a public key known to the recipient. Signature should be over the concatenation of the sequence number (little-endian format), the operation (little-endian format) the data and the session key. For SECURE_COMMAND_GET_SESSION_KEY the session key should be zero length. The data array consists of the data followed by the signature. The sum of the data_length and the sig_length cannot be more than 220. The format of the data is command specific."]
36717#[doc = ""]
36718#[doc = "ID: 11004"]
36719#[derive(Debug, Clone, PartialEq)]
36720#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
36721#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
36722#[cfg_attr(feature = "ts", derive(TS))]
36723#[cfg_attr(feature = "ts", ts(export))]
36724pub struct SECURE_COMMAND_DATA {
36725    #[doc = "Sequence ID for tagging reply."]
36726    pub sequence: u32,
36727    #[doc = "Operation being requested."]
36728    pub operation: SecureCommandOp,
36729    #[doc = "System ID."]
36730    pub target_system: u8,
36731    #[doc = "Component ID."]
36732    pub target_component: u8,
36733    #[doc = "Data length."]
36734    pub data_length: u8,
36735    #[doc = "Signature length."]
36736    pub sig_length: u8,
36737    #[doc = "Signed data."]
36738    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
36739    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
36740    pub data: [u8; 220],
36741}
36742impl SECURE_COMMAND_DATA {
36743    pub const ENCODED_LEN: usize = 232usize;
36744    pub const DEFAULT: Self = Self {
36745        sequence: 0_u32,
36746        operation: SecureCommandOp::DEFAULT,
36747        target_system: 0_u8,
36748        target_component: 0_u8,
36749        data_length: 0_u8,
36750        sig_length: 0_u8,
36751        data: [0_u8; 220usize],
36752    };
36753    #[cfg(feature = "arbitrary")]
36754    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
36755        use arbitrary::{Arbitrary, Unstructured};
36756        let mut buf = [0u8; 1024];
36757        rng.fill_bytes(&mut buf);
36758        let mut unstructured = Unstructured::new(&buf);
36759        Self::arbitrary(&mut unstructured).unwrap_or_default()
36760    }
36761}
36762impl Default for SECURE_COMMAND_DATA {
36763    fn default() -> Self {
36764        Self::DEFAULT.clone()
36765    }
36766}
36767impl MessageData for SECURE_COMMAND_DATA {
36768    type Message = MavMessage;
36769    const ID: u32 = 11004u32;
36770    const NAME: &'static str = "SECURE_COMMAND";
36771    const EXTRA_CRC: u8 = 11u8;
36772    const ENCODED_LEN: usize = 232usize;
36773    fn deser(
36774        _version: MavlinkVersion,
36775        __input: &[u8],
36776    ) -> Result<Self, ::mavlink_core::error::ParserError> {
36777        let avail_len = __input.len();
36778        let mut payload_buf = [0; Self::ENCODED_LEN];
36779        let mut buf = if avail_len < Self::ENCODED_LEN {
36780            payload_buf[0..avail_len].copy_from_slice(__input);
36781            Bytes::new(&payload_buf)
36782        } else {
36783            Bytes::new(__input)
36784        };
36785        let mut __struct = Self::default();
36786        __struct.sequence = buf.get_u32_le()?;
36787        let tmp = buf.get_u32_le()?;
36788        __struct.operation = FromPrimitive::from_u32(tmp).ok_or(
36789            ::mavlink_core::error::ParserError::InvalidEnum {
36790                enum_type: "SecureCommandOp",
36791                value: tmp as u64,
36792            },
36793        )?;
36794        __struct.target_system = buf.get_u8()?;
36795        __struct.target_component = buf.get_u8()?;
36796        __struct.data_length = buf.get_u8()?;
36797        __struct.sig_length = buf.get_u8()?;
36798        for v in &mut __struct.data {
36799            let val = buf.get_u8()?;
36800            *v = val;
36801        }
36802        Ok(__struct)
36803    }
36804    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36805        let mut __tmp = BytesMut::new(bytes);
36806        #[allow(clippy::absurd_extreme_comparisons)]
36807        #[allow(unused_comparisons)]
36808        if __tmp.remaining() < Self::ENCODED_LEN {
36809            panic!(
36810                "buffer is too small (need {} bytes, but got {})",
36811                Self::ENCODED_LEN,
36812                __tmp.remaining(),
36813            )
36814        }
36815        __tmp.put_u32_le(self.sequence);
36816        __tmp.put_u32_le(self.operation as u32);
36817        __tmp.put_u8(self.target_system);
36818        __tmp.put_u8(self.target_component);
36819        __tmp.put_u8(self.data_length);
36820        __tmp.put_u8(self.sig_length);
36821        for val in &self.data {
36822            __tmp.put_u8(*val);
36823        }
36824        if matches!(version, MavlinkVersion::V2) {
36825            let len = __tmp.len();
36826            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
36827        } else {
36828            __tmp.len()
36829        }
36830    }
36831}
36832#[doc = "Reply from secure command."]
36833#[doc = ""]
36834#[doc = "ID: 11005"]
36835#[derive(Debug, Clone, PartialEq)]
36836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
36837#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
36838#[cfg_attr(feature = "ts", derive(TS))]
36839#[cfg_attr(feature = "ts", ts(export))]
36840pub struct SECURE_COMMAND_REPLY_DATA {
36841    #[doc = "Sequence ID from request."]
36842    pub sequence: u32,
36843    #[doc = "Operation that was requested."]
36844    pub operation: SecureCommandOp,
36845    #[doc = "Result of command."]
36846    pub result: MavResult,
36847    #[doc = "Data length."]
36848    pub data_length: u8,
36849    #[doc = "Reply data."]
36850    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
36851    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
36852    pub data: [u8; 220],
36853}
36854impl SECURE_COMMAND_REPLY_DATA {
36855    pub const ENCODED_LEN: usize = 230usize;
36856    pub const DEFAULT: Self = Self {
36857        sequence: 0_u32,
36858        operation: SecureCommandOp::DEFAULT,
36859        result: MavResult::DEFAULT,
36860        data_length: 0_u8,
36861        data: [0_u8; 220usize],
36862    };
36863    #[cfg(feature = "arbitrary")]
36864    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
36865        use arbitrary::{Arbitrary, Unstructured};
36866        let mut buf = [0u8; 1024];
36867        rng.fill_bytes(&mut buf);
36868        let mut unstructured = Unstructured::new(&buf);
36869        Self::arbitrary(&mut unstructured).unwrap_or_default()
36870    }
36871}
36872impl Default for SECURE_COMMAND_REPLY_DATA {
36873    fn default() -> Self {
36874        Self::DEFAULT.clone()
36875    }
36876}
36877impl MessageData for SECURE_COMMAND_REPLY_DATA {
36878    type Message = MavMessage;
36879    const ID: u32 = 11005u32;
36880    const NAME: &'static str = "SECURE_COMMAND_REPLY";
36881    const EXTRA_CRC: u8 = 93u8;
36882    const ENCODED_LEN: usize = 230usize;
36883    fn deser(
36884        _version: MavlinkVersion,
36885        __input: &[u8],
36886    ) -> Result<Self, ::mavlink_core::error::ParserError> {
36887        let avail_len = __input.len();
36888        let mut payload_buf = [0; Self::ENCODED_LEN];
36889        let mut buf = if avail_len < Self::ENCODED_LEN {
36890            payload_buf[0..avail_len].copy_from_slice(__input);
36891            Bytes::new(&payload_buf)
36892        } else {
36893            Bytes::new(__input)
36894        };
36895        let mut __struct = Self::default();
36896        __struct.sequence = buf.get_u32_le()?;
36897        let tmp = buf.get_u32_le()?;
36898        __struct.operation = FromPrimitive::from_u32(tmp).ok_or(
36899            ::mavlink_core::error::ParserError::InvalidEnum {
36900                enum_type: "SecureCommandOp",
36901                value: tmp as u64,
36902            },
36903        )?;
36904        let tmp = buf.get_u8()?;
36905        __struct.result =
36906            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
36907                enum_type: "MavResult",
36908                value: tmp as u64,
36909            })?;
36910        __struct.data_length = buf.get_u8()?;
36911        for v in &mut __struct.data {
36912            let val = buf.get_u8()?;
36913            *v = val;
36914        }
36915        Ok(__struct)
36916    }
36917    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36918        let mut __tmp = BytesMut::new(bytes);
36919        #[allow(clippy::absurd_extreme_comparisons)]
36920        #[allow(unused_comparisons)]
36921        if __tmp.remaining() < Self::ENCODED_LEN {
36922            panic!(
36923                "buffer is too small (need {} bytes, but got {})",
36924                Self::ENCODED_LEN,
36925                __tmp.remaining(),
36926            )
36927        }
36928        __tmp.put_u32_le(self.sequence);
36929        __tmp.put_u32_le(self.operation as u32);
36930        __tmp.put_u8(self.result as u8);
36931        __tmp.put_u8(self.data_length);
36932        for val in &self.data {
36933            __tmp.put_u8(*val);
36934        }
36935        if matches!(version, MavlinkVersion::V2) {
36936            let len = __tmp.len();
36937            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
36938        } else {
36939            __tmp.len()
36940        }
36941    }
36942}
36943#[deprecated = " See `MAG_CAL_REPORT, Accel Parameters, and Gyro Parameters` (Deprecated since 2022-02)"]
36944#[doc = "Offsets and calibrations values for hardware sensors. This makes it easier to debug the calibration process."]
36945#[doc = ""]
36946#[doc = "ID: 150"]
36947#[derive(Debug, Clone, PartialEq)]
36948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
36949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
36950#[cfg_attr(feature = "ts", derive(TS))]
36951#[cfg_attr(feature = "ts", ts(export))]
36952pub struct SENSOR_OFFSETS_DATA {
36953    #[doc = "Magnetic declination."]
36954    pub mag_declination: f32,
36955    #[doc = "Raw pressure from barometer."]
36956    pub raw_press: i32,
36957    #[doc = "Raw temperature from barometer."]
36958    pub raw_temp: i32,
36959    #[doc = "Gyro X calibration."]
36960    pub gyro_cal_x: f32,
36961    #[doc = "Gyro Y calibration."]
36962    pub gyro_cal_y: f32,
36963    #[doc = "Gyro Z calibration."]
36964    pub gyro_cal_z: f32,
36965    #[doc = "Accel X calibration."]
36966    pub accel_cal_x: f32,
36967    #[doc = "Accel Y calibration."]
36968    pub accel_cal_y: f32,
36969    #[doc = "Accel Z calibration."]
36970    pub accel_cal_z: f32,
36971    #[doc = "Magnetometer X offset."]
36972    pub mag_ofs_x: i16,
36973    #[doc = "Magnetometer Y offset."]
36974    pub mag_ofs_y: i16,
36975    #[doc = "Magnetometer Z offset."]
36976    pub mag_ofs_z: i16,
36977}
36978impl SENSOR_OFFSETS_DATA {
36979    pub const ENCODED_LEN: usize = 42usize;
36980    pub const DEFAULT: Self = Self {
36981        mag_declination: 0.0_f32,
36982        raw_press: 0_i32,
36983        raw_temp: 0_i32,
36984        gyro_cal_x: 0.0_f32,
36985        gyro_cal_y: 0.0_f32,
36986        gyro_cal_z: 0.0_f32,
36987        accel_cal_x: 0.0_f32,
36988        accel_cal_y: 0.0_f32,
36989        accel_cal_z: 0.0_f32,
36990        mag_ofs_x: 0_i16,
36991        mag_ofs_y: 0_i16,
36992        mag_ofs_z: 0_i16,
36993    };
36994    #[cfg(feature = "arbitrary")]
36995    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
36996        use arbitrary::{Arbitrary, Unstructured};
36997        let mut buf = [0u8; 1024];
36998        rng.fill_bytes(&mut buf);
36999        let mut unstructured = Unstructured::new(&buf);
37000        Self::arbitrary(&mut unstructured).unwrap_or_default()
37001    }
37002}
37003impl Default for SENSOR_OFFSETS_DATA {
37004    fn default() -> Self {
37005        Self::DEFAULT.clone()
37006    }
37007}
37008impl MessageData for SENSOR_OFFSETS_DATA {
37009    type Message = MavMessage;
37010    const ID: u32 = 150u32;
37011    const NAME: &'static str = "SENSOR_OFFSETS";
37012    const EXTRA_CRC: u8 = 134u8;
37013    const ENCODED_LEN: usize = 42usize;
37014    fn deser(
37015        _version: MavlinkVersion,
37016        __input: &[u8],
37017    ) -> Result<Self, ::mavlink_core::error::ParserError> {
37018        let avail_len = __input.len();
37019        let mut payload_buf = [0; Self::ENCODED_LEN];
37020        let mut buf = if avail_len < Self::ENCODED_LEN {
37021            payload_buf[0..avail_len].copy_from_slice(__input);
37022            Bytes::new(&payload_buf)
37023        } else {
37024            Bytes::new(__input)
37025        };
37026        let mut __struct = Self::default();
37027        __struct.mag_declination = buf.get_f32_le()?;
37028        __struct.raw_press = buf.get_i32_le()?;
37029        __struct.raw_temp = buf.get_i32_le()?;
37030        __struct.gyro_cal_x = buf.get_f32_le()?;
37031        __struct.gyro_cal_y = buf.get_f32_le()?;
37032        __struct.gyro_cal_z = buf.get_f32_le()?;
37033        __struct.accel_cal_x = buf.get_f32_le()?;
37034        __struct.accel_cal_y = buf.get_f32_le()?;
37035        __struct.accel_cal_z = buf.get_f32_le()?;
37036        __struct.mag_ofs_x = buf.get_i16_le()?;
37037        __struct.mag_ofs_y = buf.get_i16_le()?;
37038        __struct.mag_ofs_z = buf.get_i16_le()?;
37039        Ok(__struct)
37040    }
37041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37042        let mut __tmp = BytesMut::new(bytes);
37043        #[allow(clippy::absurd_extreme_comparisons)]
37044        #[allow(unused_comparisons)]
37045        if __tmp.remaining() < Self::ENCODED_LEN {
37046            panic!(
37047                "buffer is too small (need {} bytes, but got {})",
37048                Self::ENCODED_LEN,
37049                __tmp.remaining(),
37050            )
37051        }
37052        __tmp.put_f32_le(self.mag_declination);
37053        __tmp.put_i32_le(self.raw_press);
37054        __tmp.put_i32_le(self.raw_temp);
37055        __tmp.put_f32_le(self.gyro_cal_x);
37056        __tmp.put_f32_le(self.gyro_cal_y);
37057        __tmp.put_f32_le(self.gyro_cal_z);
37058        __tmp.put_f32_le(self.accel_cal_x);
37059        __tmp.put_f32_le(self.accel_cal_y);
37060        __tmp.put_f32_le(self.accel_cal_z);
37061        __tmp.put_i16_le(self.mag_ofs_x);
37062        __tmp.put_i16_le(self.mag_ofs_y);
37063        __tmp.put_i16_le(self.mag_ofs_z);
37064        if matches!(version, MavlinkVersion::V2) {
37065            let len = __tmp.len();
37066            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
37067        } else {
37068            __tmp.len()
37069        }
37070    }
37071}
37072#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
37073#[doc = ""]
37074#[doc = "ID: 126"]
37075#[derive(Debug, Clone, PartialEq)]
37076#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
37077#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
37078#[cfg_attr(feature = "ts", derive(TS))]
37079#[cfg_attr(feature = "ts", ts(export))]
37080pub struct SERIAL_CONTROL_DATA {
37081    #[doc = "Baudrate of transfer. Zero means no change."]
37082    pub baudrate: u32,
37083    #[doc = "Timeout for reply data"]
37084    pub timeout: u16,
37085    #[doc = "Serial control device type."]
37086    pub device: SerialControlDev,
37087    #[doc = "Bitmap of serial control flags."]
37088    pub flags: SerialControlFlag,
37089    #[doc = "how many bytes in this transfer"]
37090    pub count: u8,
37091    #[doc = "serial data"]
37092    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
37093    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
37094    pub data: [u8; 70],
37095    #[doc = "System ID"]
37096    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
37097    pub target_system: u8,
37098    #[doc = "Component ID"]
37099    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
37100    pub target_component: u8,
37101}
37102impl SERIAL_CONTROL_DATA {
37103    pub const ENCODED_LEN: usize = 81usize;
37104    pub const DEFAULT: Self = Self {
37105        baudrate: 0_u32,
37106        timeout: 0_u16,
37107        device: SerialControlDev::DEFAULT,
37108        flags: SerialControlFlag::DEFAULT,
37109        count: 0_u8,
37110        data: [0_u8; 70usize],
37111        target_system: 0_u8,
37112        target_component: 0_u8,
37113    };
37114    #[cfg(feature = "arbitrary")]
37115    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
37116        use arbitrary::{Arbitrary, Unstructured};
37117        let mut buf = [0u8; 1024];
37118        rng.fill_bytes(&mut buf);
37119        let mut unstructured = Unstructured::new(&buf);
37120        Self::arbitrary(&mut unstructured).unwrap_or_default()
37121    }
37122}
37123impl Default for SERIAL_CONTROL_DATA {
37124    fn default() -> Self {
37125        Self::DEFAULT.clone()
37126    }
37127}
37128impl MessageData for SERIAL_CONTROL_DATA {
37129    type Message = MavMessage;
37130    const ID: u32 = 126u32;
37131    const NAME: &'static str = "SERIAL_CONTROL";
37132    const EXTRA_CRC: u8 = 220u8;
37133    const ENCODED_LEN: usize = 81usize;
37134    fn deser(
37135        _version: MavlinkVersion,
37136        __input: &[u8],
37137    ) -> Result<Self, ::mavlink_core::error::ParserError> {
37138        let avail_len = __input.len();
37139        let mut payload_buf = [0; Self::ENCODED_LEN];
37140        let mut buf = if avail_len < Self::ENCODED_LEN {
37141            payload_buf[0..avail_len].copy_from_slice(__input);
37142            Bytes::new(&payload_buf)
37143        } else {
37144            Bytes::new(__input)
37145        };
37146        let mut __struct = Self::default();
37147        __struct.baudrate = buf.get_u32_le()?;
37148        __struct.timeout = buf.get_u16_le()?;
37149        let tmp = buf.get_u8()?;
37150        __struct.device =
37151            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
37152                enum_type: "SerialControlDev",
37153                value: tmp as u64,
37154            })?;
37155        let tmp = buf.get_u8()?;
37156        __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
37157            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
37158                flag_type: "SerialControlFlag",
37159                value: tmp as u64,
37160            })?;
37161        __struct.count = buf.get_u8()?;
37162        for v in &mut __struct.data {
37163            let val = buf.get_u8()?;
37164            *v = val;
37165        }
37166        __struct.target_system = buf.get_u8()?;
37167        __struct.target_component = buf.get_u8()?;
37168        Ok(__struct)
37169    }
37170    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37171        let mut __tmp = BytesMut::new(bytes);
37172        #[allow(clippy::absurd_extreme_comparisons)]
37173        #[allow(unused_comparisons)]
37174        if __tmp.remaining() < Self::ENCODED_LEN {
37175            panic!(
37176                "buffer is too small (need {} bytes, but got {})",
37177                Self::ENCODED_LEN,
37178                __tmp.remaining(),
37179            )
37180        }
37181        __tmp.put_u32_le(self.baudrate);
37182        __tmp.put_u16_le(self.timeout);
37183        __tmp.put_u8(self.device as u8);
37184        __tmp.put_u8(self.flags.bits() as u8);
37185        __tmp.put_u8(self.count);
37186        for val in &self.data {
37187            __tmp.put_u8(*val);
37188        }
37189        if matches!(version, MavlinkVersion::V2) {
37190            __tmp.put_u8(self.target_system);
37191            __tmp.put_u8(self.target_component);
37192            let len = __tmp.len();
37193            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
37194        } else {
37195            __tmp.len()
37196        }
37197    }
37198}
37199#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
37200#[doc = ""]
37201#[doc = "ID: 36"]
37202#[derive(Debug, Clone, PartialEq)]
37203#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
37204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
37205#[cfg_attr(feature = "ts", derive(TS))]
37206#[cfg_attr(feature = "ts", ts(export))]
37207pub struct SERVO_OUTPUT_RAW_DATA {
37208    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
37209    pub time_usec: u32,
37210    #[doc = "Servo output 1 value"]
37211    pub servo1_raw: u16,
37212    #[doc = "Servo output 2 value"]
37213    pub servo2_raw: u16,
37214    #[doc = "Servo output 3 value"]
37215    pub servo3_raw: u16,
37216    #[doc = "Servo output 4 value"]
37217    pub servo4_raw: u16,
37218    #[doc = "Servo output 5 value"]
37219    pub servo5_raw: u16,
37220    #[doc = "Servo output 6 value"]
37221    pub servo6_raw: u16,
37222    #[doc = "Servo output 7 value"]
37223    pub servo7_raw: u16,
37224    #[doc = "Servo output 8 value"]
37225    pub servo8_raw: u16,
37226    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
37227    pub port: u8,
37228    #[doc = "Servo output 9 value"]
37229    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
37230    pub servo9_raw: u16,
37231    #[doc = "Servo output 10 value"]
37232    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
37233    pub servo10_raw: u16,
37234    #[doc = "Servo output 11 value"]
37235    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
37236    pub servo11_raw: u16,
37237    #[doc = "Servo output 12 value"]
37238    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
37239    pub servo12_raw: u16,
37240    #[doc = "Servo output 13 value"]
37241    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
37242    pub servo13_raw: u16,
37243    #[doc = "Servo output 14 value"]
37244    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
37245    pub servo14_raw: u16,
37246    #[doc = "Servo output 15 value"]
37247    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
37248    pub servo15_raw: u16,
37249    #[doc = "Servo output 16 value"]
37250    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
37251    pub servo16_raw: u16,
37252}
37253impl SERVO_OUTPUT_RAW_DATA {
37254    pub const ENCODED_LEN: usize = 37usize;
37255    pub const DEFAULT: Self = Self {
37256        time_usec: 0_u32,
37257        servo1_raw: 0_u16,
37258        servo2_raw: 0_u16,
37259        servo3_raw: 0_u16,
37260        servo4_raw: 0_u16,
37261        servo5_raw: 0_u16,
37262        servo6_raw: 0_u16,
37263        servo7_raw: 0_u16,
37264        servo8_raw: 0_u16,
37265        port: 0_u8,
37266        servo9_raw: 0_u16,
37267        servo10_raw: 0_u16,
37268        servo11_raw: 0_u16,
37269        servo12_raw: 0_u16,
37270        servo13_raw: 0_u16,
37271        servo14_raw: 0_u16,
37272        servo15_raw: 0_u16,
37273        servo16_raw: 0_u16,
37274    };
37275    #[cfg(feature = "arbitrary")]
37276    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
37277        use arbitrary::{Arbitrary, Unstructured};
37278        let mut buf = [0u8; 1024];
37279        rng.fill_bytes(&mut buf);
37280        let mut unstructured = Unstructured::new(&buf);
37281        Self::arbitrary(&mut unstructured).unwrap_or_default()
37282    }
37283}
37284impl Default for SERVO_OUTPUT_RAW_DATA {
37285    fn default() -> Self {
37286        Self::DEFAULT.clone()
37287    }
37288}
37289impl MessageData for SERVO_OUTPUT_RAW_DATA {
37290    type Message = MavMessage;
37291    const ID: u32 = 36u32;
37292    const NAME: &'static str = "SERVO_OUTPUT_RAW";
37293    const EXTRA_CRC: u8 = 222u8;
37294    const ENCODED_LEN: usize = 37usize;
37295    fn deser(
37296        _version: MavlinkVersion,
37297        __input: &[u8],
37298    ) -> Result<Self, ::mavlink_core::error::ParserError> {
37299        let avail_len = __input.len();
37300        let mut payload_buf = [0; Self::ENCODED_LEN];
37301        let mut buf = if avail_len < Self::ENCODED_LEN {
37302            payload_buf[0..avail_len].copy_from_slice(__input);
37303            Bytes::new(&payload_buf)
37304        } else {
37305            Bytes::new(__input)
37306        };
37307        let mut __struct = Self::default();
37308        __struct.time_usec = buf.get_u32_le()?;
37309        __struct.servo1_raw = buf.get_u16_le()?;
37310        __struct.servo2_raw = buf.get_u16_le()?;
37311        __struct.servo3_raw = buf.get_u16_le()?;
37312        __struct.servo4_raw = buf.get_u16_le()?;
37313        __struct.servo5_raw = buf.get_u16_le()?;
37314        __struct.servo6_raw = buf.get_u16_le()?;
37315        __struct.servo7_raw = buf.get_u16_le()?;
37316        __struct.servo8_raw = buf.get_u16_le()?;
37317        __struct.port = buf.get_u8()?;
37318        __struct.servo9_raw = buf.get_u16_le()?;
37319        __struct.servo10_raw = buf.get_u16_le()?;
37320        __struct.servo11_raw = buf.get_u16_le()?;
37321        __struct.servo12_raw = buf.get_u16_le()?;
37322        __struct.servo13_raw = buf.get_u16_le()?;
37323        __struct.servo14_raw = buf.get_u16_le()?;
37324        __struct.servo15_raw = buf.get_u16_le()?;
37325        __struct.servo16_raw = buf.get_u16_le()?;
37326        Ok(__struct)
37327    }
37328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37329        let mut __tmp = BytesMut::new(bytes);
37330        #[allow(clippy::absurd_extreme_comparisons)]
37331        #[allow(unused_comparisons)]
37332        if __tmp.remaining() < Self::ENCODED_LEN {
37333            panic!(
37334                "buffer is too small (need {} bytes, but got {})",
37335                Self::ENCODED_LEN,
37336                __tmp.remaining(),
37337            )
37338        }
37339        __tmp.put_u32_le(self.time_usec);
37340        __tmp.put_u16_le(self.servo1_raw);
37341        __tmp.put_u16_le(self.servo2_raw);
37342        __tmp.put_u16_le(self.servo3_raw);
37343        __tmp.put_u16_le(self.servo4_raw);
37344        __tmp.put_u16_le(self.servo5_raw);
37345        __tmp.put_u16_le(self.servo6_raw);
37346        __tmp.put_u16_le(self.servo7_raw);
37347        __tmp.put_u16_le(self.servo8_raw);
37348        __tmp.put_u8(self.port);
37349        if matches!(version, MavlinkVersion::V2) {
37350            __tmp.put_u16_le(self.servo9_raw);
37351            __tmp.put_u16_le(self.servo10_raw);
37352            __tmp.put_u16_le(self.servo11_raw);
37353            __tmp.put_u16_le(self.servo12_raw);
37354            __tmp.put_u16_le(self.servo13_raw);
37355            __tmp.put_u16_le(self.servo14_raw);
37356            __tmp.put_u16_le(self.servo15_raw);
37357            __tmp.put_u16_le(self.servo16_raw);
37358            let len = __tmp.len();
37359            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
37360        } else {
37361            __tmp.len()
37362        }
37363    }
37364}
37365#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
37366#[doc = ""]
37367#[doc = "ID: 256"]
37368#[derive(Debug, Clone, PartialEq)]
37369#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
37370#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
37371#[cfg_attr(feature = "ts", derive(TS))]
37372#[cfg_attr(feature = "ts", ts(export))]
37373pub struct SETUP_SIGNING_DATA {
37374    #[doc = "initial timestamp"]
37375    pub initial_timestamp: u64,
37376    #[doc = "system id of the target"]
37377    pub target_system: u8,
37378    #[doc = "component ID of the target"]
37379    pub target_component: u8,
37380    #[doc = "signing key"]
37381    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
37382    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
37383    pub secret_key: [u8; 32],
37384}
37385impl SETUP_SIGNING_DATA {
37386    pub const ENCODED_LEN: usize = 42usize;
37387    pub const DEFAULT: Self = Self {
37388        initial_timestamp: 0_u64,
37389        target_system: 0_u8,
37390        target_component: 0_u8,
37391        secret_key: [0_u8; 32usize],
37392    };
37393    #[cfg(feature = "arbitrary")]
37394    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
37395        use arbitrary::{Arbitrary, Unstructured};
37396        let mut buf = [0u8; 1024];
37397        rng.fill_bytes(&mut buf);
37398        let mut unstructured = Unstructured::new(&buf);
37399        Self::arbitrary(&mut unstructured).unwrap_or_default()
37400    }
37401}
37402impl Default for SETUP_SIGNING_DATA {
37403    fn default() -> Self {
37404        Self::DEFAULT.clone()
37405    }
37406}
37407impl MessageData for SETUP_SIGNING_DATA {
37408    type Message = MavMessage;
37409    const ID: u32 = 256u32;
37410    const NAME: &'static str = "SETUP_SIGNING";
37411    const EXTRA_CRC: u8 = 71u8;
37412    const ENCODED_LEN: usize = 42usize;
37413    fn deser(
37414        _version: MavlinkVersion,
37415        __input: &[u8],
37416    ) -> Result<Self, ::mavlink_core::error::ParserError> {
37417        let avail_len = __input.len();
37418        let mut payload_buf = [0; Self::ENCODED_LEN];
37419        let mut buf = if avail_len < Self::ENCODED_LEN {
37420            payload_buf[0..avail_len].copy_from_slice(__input);
37421            Bytes::new(&payload_buf)
37422        } else {
37423            Bytes::new(__input)
37424        };
37425        let mut __struct = Self::default();
37426        __struct.initial_timestamp = buf.get_u64_le()?;
37427        __struct.target_system = buf.get_u8()?;
37428        __struct.target_component = buf.get_u8()?;
37429        for v in &mut __struct.secret_key {
37430            let val = buf.get_u8()?;
37431            *v = val;
37432        }
37433        Ok(__struct)
37434    }
37435    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37436        let mut __tmp = BytesMut::new(bytes);
37437        #[allow(clippy::absurd_extreme_comparisons)]
37438        #[allow(unused_comparisons)]
37439        if __tmp.remaining() < Self::ENCODED_LEN {
37440            panic!(
37441                "buffer is too small (need {} bytes, but got {})",
37442                Self::ENCODED_LEN,
37443                __tmp.remaining(),
37444            )
37445        }
37446        __tmp.put_u64_le(self.initial_timestamp);
37447        __tmp.put_u8(self.target_system);
37448        __tmp.put_u8(self.target_component);
37449        for val in &self.secret_key {
37450            __tmp.put_u8(*val);
37451        }
37452        if matches!(version, MavlinkVersion::V2) {
37453            let len = __tmp.len();
37454            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
37455        } else {
37456            __tmp.len()
37457        }
37458    }
37459}
37460#[doc = "Set the vehicle attitude and body angular rates."]
37461#[doc = ""]
37462#[doc = "ID: 139"]
37463#[derive(Debug, Clone, PartialEq)]
37464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
37465#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
37466#[cfg_attr(feature = "ts", derive(TS))]
37467#[cfg_attr(feature = "ts", ts(export))]
37468pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
37469    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
37470    pub time_usec: u64,
37471    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
37472    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
37473    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
37474    pub controls: [f32; 8],
37475    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
37476    pub group_mlx: u8,
37477    #[doc = "System ID"]
37478    pub target_system: u8,
37479    #[doc = "Component ID"]
37480    pub target_component: u8,
37481}
37482impl SET_ACTUATOR_CONTROL_TARGET_DATA {
37483    pub const ENCODED_LEN: usize = 43usize;
37484    pub const DEFAULT: Self = Self {
37485        time_usec: 0_u64,
37486        controls: [0.0_f32; 8usize],
37487        group_mlx: 0_u8,
37488        target_system: 0_u8,
37489        target_component: 0_u8,
37490    };
37491    #[cfg(feature = "arbitrary")]
37492    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
37493        use arbitrary::{Arbitrary, Unstructured};
37494        let mut buf = [0u8; 1024];
37495        rng.fill_bytes(&mut buf);
37496        let mut unstructured = Unstructured::new(&buf);
37497        Self::arbitrary(&mut unstructured).unwrap_or_default()
37498    }
37499}
37500impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
37501    fn default() -> Self {
37502        Self::DEFAULT.clone()
37503    }
37504}
37505impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
37506    type Message = MavMessage;
37507    const ID: u32 = 139u32;
37508    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
37509    const EXTRA_CRC: u8 = 168u8;
37510    const ENCODED_LEN: usize = 43usize;
37511    fn deser(
37512        _version: MavlinkVersion,
37513        __input: &[u8],
37514    ) -> Result<Self, ::mavlink_core::error::ParserError> {
37515        let avail_len = __input.len();
37516        let mut payload_buf = [0; Self::ENCODED_LEN];
37517        let mut buf = if avail_len < Self::ENCODED_LEN {
37518            payload_buf[0..avail_len].copy_from_slice(__input);
37519            Bytes::new(&payload_buf)
37520        } else {
37521            Bytes::new(__input)
37522        };
37523        let mut __struct = Self::default();
37524        __struct.time_usec = buf.get_u64_le()?;
37525        for v in &mut __struct.controls {
37526            let val = buf.get_f32_le()?;
37527            *v = val;
37528        }
37529        __struct.group_mlx = buf.get_u8()?;
37530        __struct.target_system = buf.get_u8()?;
37531        __struct.target_component = buf.get_u8()?;
37532        Ok(__struct)
37533    }
37534    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37535        let mut __tmp = BytesMut::new(bytes);
37536        #[allow(clippy::absurd_extreme_comparisons)]
37537        #[allow(unused_comparisons)]
37538        if __tmp.remaining() < Self::ENCODED_LEN {
37539            panic!(
37540                "buffer is too small (need {} bytes, but got {})",
37541                Self::ENCODED_LEN,
37542                __tmp.remaining(),
37543            )
37544        }
37545        __tmp.put_u64_le(self.time_usec);
37546        for val in &self.controls {
37547            __tmp.put_f32_le(*val);
37548        }
37549        __tmp.put_u8(self.group_mlx);
37550        __tmp.put_u8(self.target_system);
37551        __tmp.put_u8(self.target_component);
37552        if matches!(version, MavlinkVersion::V2) {
37553            let len = __tmp.len();
37554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
37555        } else {
37556            __tmp.len()
37557        }
37558    }
37559}
37560#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
37561#[doc = ""]
37562#[doc = "ID: 82"]
37563#[derive(Debug, Clone, PartialEq)]
37564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
37565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
37566#[cfg_attr(feature = "ts", derive(TS))]
37567#[cfg_attr(feature = "ts", ts(export))]
37568pub struct SET_ATTITUDE_TARGET_DATA {
37569    #[doc = "Timestamp (time since system boot)."]
37570    pub time_boot_ms: u32,
37571    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
37572    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
37573    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
37574    pub q: [f32; 4],
37575    #[doc = "Body roll rate"]
37576    pub body_roll_rate: f32,
37577    #[doc = "Body pitch rate"]
37578    pub body_pitch_rate: f32,
37579    #[doc = "Body yaw rate"]
37580    pub body_yaw_rate: f32,
37581    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
37582    pub thrust: f32,
37583    #[doc = "System ID"]
37584    pub target_system: u8,
37585    #[doc = "Component ID"]
37586    pub target_component: u8,
37587    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
37588    pub type_mask: AttitudeTargetTypemask,
37589    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
37590    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
37591    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
37592    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
37593    pub thrust_body: [f32; 3],
37594}
37595impl SET_ATTITUDE_TARGET_DATA {
37596    pub const ENCODED_LEN: usize = 51usize;
37597    pub const DEFAULT: Self = Self {
37598        time_boot_ms: 0_u32,
37599        q: [0.0_f32; 4usize],
37600        body_roll_rate: 0.0_f32,
37601        body_pitch_rate: 0.0_f32,
37602        body_yaw_rate: 0.0_f32,
37603        thrust: 0.0_f32,
37604        target_system: 0_u8,
37605        target_component: 0_u8,
37606        type_mask: AttitudeTargetTypemask::DEFAULT,
37607        thrust_body: [0.0_f32; 3usize],
37608    };
37609    #[cfg(feature = "arbitrary")]
37610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
37611        use arbitrary::{Arbitrary, Unstructured};
37612        let mut buf = [0u8; 1024];
37613        rng.fill_bytes(&mut buf);
37614        let mut unstructured = Unstructured::new(&buf);
37615        Self::arbitrary(&mut unstructured).unwrap_or_default()
37616    }
37617}
37618impl Default for SET_ATTITUDE_TARGET_DATA {
37619    fn default() -> Self {
37620        Self::DEFAULT.clone()
37621    }
37622}
37623impl MessageData for SET_ATTITUDE_TARGET_DATA {
37624    type Message = MavMessage;
37625    const ID: u32 = 82u32;
37626    const NAME: &'static str = "SET_ATTITUDE_TARGET";
37627    const EXTRA_CRC: u8 = 49u8;
37628    const ENCODED_LEN: usize = 51usize;
37629    fn deser(
37630        _version: MavlinkVersion,
37631        __input: &[u8],
37632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
37633        let avail_len = __input.len();
37634        let mut payload_buf = [0; Self::ENCODED_LEN];
37635        let mut buf = if avail_len < Self::ENCODED_LEN {
37636            payload_buf[0..avail_len].copy_from_slice(__input);
37637            Bytes::new(&payload_buf)
37638        } else {
37639            Bytes::new(__input)
37640        };
37641        let mut __struct = Self::default();
37642        __struct.time_boot_ms = buf.get_u32_le()?;
37643        for v in &mut __struct.q {
37644            let val = buf.get_f32_le()?;
37645            *v = val;
37646        }
37647        __struct.body_roll_rate = buf.get_f32_le()?;
37648        __struct.body_pitch_rate = buf.get_f32_le()?;
37649        __struct.body_yaw_rate = buf.get_f32_le()?;
37650        __struct.thrust = buf.get_f32_le()?;
37651        __struct.target_system = buf.get_u8()?;
37652        __struct.target_component = buf.get_u8()?;
37653        let tmp = buf.get_u8()?;
37654        __struct.type_mask =
37655            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
37656                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
37657                    flag_type: "AttitudeTargetTypemask",
37658                    value: tmp as u64,
37659                })?;
37660        for v in &mut __struct.thrust_body {
37661            let val = buf.get_f32_le()?;
37662            *v = val;
37663        }
37664        Ok(__struct)
37665    }
37666    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37667        let mut __tmp = BytesMut::new(bytes);
37668        #[allow(clippy::absurd_extreme_comparisons)]
37669        #[allow(unused_comparisons)]
37670        if __tmp.remaining() < Self::ENCODED_LEN {
37671            panic!(
37672                "buffer is too small (need {} bytes, but got {})",
37673                Self::ENCODED_LEN,
37674                __tmp.remaining(),
37675            )
37676        }
37677        __tmp.put_u32_le(self.time_boot_ms);
37678        for val in &self.q {
37679            __tmp.put_f32_le(*val);
37680        }
37681        __tmp.put_f32_le(self.body_roll_rate);
37682        __tmp.put_f32_le(self.body_pitch_rate);
37683        __tmp.put_f32_le(self.body_yaw_rate);
37684        __tmp.put_f32_le(self.thrust);
37685        __tmp.put_u8(self.target_system);
37686        __tmp.put_u8(self.target_component);
37687        __tmp.put_u8(self.type_mask.bits() as u8);
37688        if matches!(version, MavlinkVersion::V2) {
37689            for val in &self.thrust_body {
37690                __tmp.put_f32_le(*val);
37691            }
37692            let len = __tmp.len();
37693            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
37694        } else {
37695            __tmp.len()
37696        }
37697    }
37698}
37699#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
37700#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
37701#[doc = ""]
37702#[doc = "ID: 48"]
37703#[derive(Debug, Clone, PartialEq)]
37704#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
37705#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
37706#[cfg_attr(feature = "ts", derive(TS))]
37707#[cfg_attr(feature = "ts", ts(export))]
37708pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
37709    #[doc = "Latitude (WGS84)"]
37710    pub latitude: i32,
37711    #[doc = "Longitude (WGS84)"]
37712    pub longitude: i32,
37713    #[doc = "Altitude (MSL). Positive for up."]
37714    pub altitude: i32,
37715    #[doc = "System ID"]
37716    pub target_system: u8,
37717    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
37718    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
37719    pub time_usec: u64,
37720}
37721impl SET_GPS_GLOBAL_ORIGIN_DATA {
37722    pub const ENCODED_LEN: usize = 21usize;
37723    pub const DEFAULT: Self = Self {
37724        latitude: 0_i32,
37725        longitude: 0_i32,
37726        altitude: 0_i32,
37727        target_system: 0_u8,
37728        time_usec: 0_u64,
37729    };
37730    #[cfg(feature = "arbitrary")]
37731    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
37732        use arbitrary::{Arbitrary, Unstructured};
37733        let mut buf = [0u8; 1024];
37734        rng.fill_bytes(&mut buf);
37735        let mut unstructured = Unstructured::new(&buf);
37736        Self::arbitrary(&mut unstructured).unwrap_or_default()
37737    }
37738}
37739impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
37740    fn default() -> Self {
37741        Self::DEFAULT.clone()
37742    }
37743}
37744impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
37745    type Message = MavMessage;
37746    const ID: u32 = 48u32;
37747    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
37748    const EXTRA_CRC: u8 = 41u8;
37749    const ENCODED_LEN: usize = 21usize;
37750    fn deser(
37751        _version: MavlinkVersion,
37752        __input: &[u8],
37753    ) -> Result<Self, ::mavlink_core::error::ParserError> {
37754        let avail_len = __input.len();
37755        let mut payload_buf = [0; Self::ENCODED_LEN];
37756        let mut buf = if avail_len < Self::ENCODED_LEN {
37757            payload_buf[0..avail_len].copy_from_slice(__input);
37758            Bytes::new(&payload_buf)
37759        } else {
37760            Bytes::new(__input)
37761        };
37762        let mut __struct = Self::default();
37763        __struct.latitude = buf.get_i32_le()?;
37764        __struct.longitude = buf.get_i32_le()?;
37765        __struct.altitude = buf.get_i32_le()?;
37766        __struct.target_system = buf.get_u8()?;
37767        __struct.time_usec = buf.get_u64_le()?;
37768        Ok(__struct)
37769    }
37770    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37771        let mut __tmp = BytesMut::new(bytes);
37772        #[allow(clippy::absurd_extreme_comparisons)]
37773        #[allow(unused_comparisons)]
37774        if __tmp.remaining() < Self::ENCODED_LEN {
37775            panic!(
37776                "buffer is too small (need {} bytes, but got {})",
37777                Self::ENCODED_LEN,
37778                __tmp.remaining(),
37779            )
37780        }
37781        __tmp.put_i32_le(self.latitude);
37782        __tmp.put_i32_le(self.longitude);
37783        __tmp.put_i32_le(self.altitude);
37784        __tmp.put_u8(self.target_system);
37785        if matches!(version, MavlinkVersion::V2) {
37786            __tmp.put_u64_le(self.time_usec);
37787            let len = __tmp.len();
37788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
37789        } else {
37790            __tmp.len()
37791        }
37792    }
37793}
37794#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
37795#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
37796#[doc = ""]
37797#[doc = "ID: 243"]
37798#[derive(Debug, Clone, PartialEq)]
37799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
37800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
37801#[cfg_attr(feature = "ts", derive(TS))]
37802#[cfg_attr(feature = "ts", ts(export))]
37803pub struct SET_HOME_POSITION_DATA {
37804    #[doc = "Latitude (WGS84)"]
37805    pub latitude: i32,
37806    #[doc = "Longitude (WGS84)"]
37807    pub longitude: i32,
37808    #[doc = "Altitude (MSL). Positive for up."]
37809    pub altitude: i32,
37810    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
37811    pub x: f32,
37812    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
37813    pub y: f32,
37814    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
37815    pub z: f32,
37816    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
37817    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
37818    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
37819    pub q: [f32; 4],
37820    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
37821    pub approach_x: f32,
37822    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
37823    pub approach_y: f32,
37824    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
37825    pub approach_z: f32,
37826    #[doc = "System ID."]
37827    pub target_system: u8,
37828    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
37829    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
37830    pub time_usec: u64,
37831}
37832impl SET_HOME_POSITION_DATA {
37833    pub const ENCODED_LEN: usize = 61usize;
37834    pub const DEFAULT: Self = Self {
37835        latitude: 0_i32,
37836        longitude: 0_i32,
37837        altitude: 0_i32,
37838        x: 0.0_f32,
37839        y: 0.0_f32,
37840        z: 0.0_f32,
37841        q: [0.0_f32; 4usize],
37842        approach_x: 0.0_f32,
37843        approach_y: 0.0_f32,
37844        approach_z: 0.0_f32,
37845        target_system: 0_u8,
37846        time_usec: 0_u64,
37847    };
37848    #[cfg(feature = "arbitrary")]
37849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
37850        use arbitrary::{Arbitrary, Unstructured};
37851        let mut buf = [0u8; 1024];
37852        rng.fill_bytes(&mut buf);
37853        let mut unstructured = Unstructured::new(&buf);
37854        Self::arbitrary(&mut unstructured).unwrap_or_default()
37855    }
37856}
37857impl Default for SET_HOME_POSITION_DATA {
37858    fn default() -> Self {
37859        Self::DEFAULT.clone()
37860    }
37861}
37862impl MessageData for SET_HOME_POSITION_DATA {
37863    type Message = MavMessage;
37864    const ID: u32 = 243u32;
37865    const NAME: &'static str = "SET_HOME_POSITION";
37866    const EXTRA_CRC: u8 = 85u8;
37867    const ENCODED_LEN: usize = 61usize;
37868    fn deser(
37869        _version: MavlinkVersion,
37870        __input: &[u8],
37871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
37872        let avail_len = __input.len();
37873        let mut payload_buf = [0; Self::ENCODED_LEN];
37874        let mut buf = if avail_len < Self::ENCODED_LEN {
37875            payload_buf[0..avail_len].copy_from_slice(__input);
37876            Bytes::new(&payload_buf)
37877        } else {
37878            Bytes::new(__input)
37879        };
37880        let mut __struct = Self::default();
37881        __struct.latitude = buf.get_i32_le()?;
37882        __struct.longitude = buf.get_i32_le()?;
37883        __struct.altitude = buf.get_i32_le()?;
37884        __struct.x = buf.get_f32_le()?;
37885        __struct.y = buf.get_f32_le()?;
37886        __struct.z = buf.get_f32_le()?;
37887        for v in &mut __struct.q {
37888            let val = buf.get_f32_le()?;
37889            *v = val;
37890        }
37891        __struct.approach_x = buf.get_f32_le()?;
37892        __struct.approach_y = buf.get_f32_le()?;
37893        __struct.approach_z = buf.get_f32_le()?;
37894        __struct.target_system = buf.get_u8()?;
37895        __struct.time_usec = buf.get_u64_le()?;
37896        Ok(__struct)
37897    }
37898    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37899        let mut __tmp = BytesMut::new(bytes);
37900        #[allow(clippy::absurd_extreme_comparisons)]
37901        #[allow(unused_comparisons)]
37902        if __tmp.remaining() < Self::ENCODED_LEN {
37903            panic!(
37904                "buffer is too small (need {} bytes, but got {})",
37905                Self::ENCODED_LEN,
37906                __tmp.remaining(),
37907            )
37908        }
37909        __tmp.put_i32_le(self.latitude);
37910        __tmp.put_i32_le(self.longitude);
37911        __tmp.put_i32_le(self.altitude);
37912        __tmp.put_f32_le(self.x);
37913        __tmp.put_f32_le(self.y);
37914        __tmp.put_f32_le(self.z);
37915        for val in &self.q {
37916            __tmp.put_f32_le(*val);
37917        }
37918        __tmp.put_f32_le(self.approach_x);
37919        __tmp.put_f32_le(self.approach_y);
37920        __tmp.put_f32_le(self.approach_z);
37921        __tmp.put_u8(self.target_system);
37922        if matches!(version, MavlinkVersion::V2) {
37923            __tmp.put_u64_le(self.time_usec);
37924            let len = __tmp.len();
37925            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
37926        } else {
37927            __tmp.len()
37928        }
37929    }
37930}
37931#[deprecated = " See `MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS` (Deprecated since 2014-07)"]
37932#[doc = "Set the magnetometer offsets."]
37933#[doc = ""]
37934#[doc = "ID: 151"]
37935#[derive(Debug, Clone, PartialEq)]
37936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
37937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
37938#[cfg_attr(feature = "ts", derive(TS))]
37939#[cfg_attr(feature = "ts", ts(export))]
37940pub struct SET_MAG_OFFSETS_DATA {
37941    #[doc = "Magnetometer X offset."]
37942    pub mag_ofs_x: i16,
37943    #[doc = "Magnetometer Y offset."]
37944    pub mag_ofs_y: i16,
37945    #[doc = "Magnetometer Z offset."]
37946    pub mag_ofs_z: i16,
37947    #[doc = "System ID."]
37948    pub target_system: u8,
37949    #[doc = "Component ID."]
37950    pub target_component: u8,
37951}
37952impl SET_MAG_OFFSETS_DATA {
37953    pub const ENCODED_LEN: usize = 8usize;
37954    pub const DEFAULT: Self = Self {
37955        mag_ofs_x: 0_i16,
37956        mag_ofs_y: 0_i16,
37957        mag_ofs_z: 0_i16,
37958        target_system: 0_u8,
37959        target_component: 0_u8,
37960    };
37961    #[cfg(feature = "arbitrary")]
37962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
37963        use arbitrary::{Arbitrary, Unstructured};
37964        let mut buf = [0u8; 1024];
37965        rng.fill_bytes(&mut buf);
37966        let mut unstructured = Unstructured::new(&buf);
37967        Self::arbitrary(&mut unstructured).unwrap_or_default()
37968    }
37969}
37970impl Default for SET_MAG_OFFSETS_DATA {
37971    fn default() -> Self {
37972        Self::DEFAULT.clone()
37973    }
37974}
37975impl MessageData for SET_MAG_OFFSETS_DATA {
37976    type Message = MavMessage;
37977    const ID: u32 = 151u32;
37978    const NAME: &'static str = "SET_MAG_OFFSETS";
37979    const EXTRA_CRC: u8 = 219u8;
37980    const ENCODED_LEN: usize = 8usize;
37981    fn deser(
37982        _version: MavlinkVersion,
37983        __input: &[u8],
37984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
37985        let avail_len = __input.len();
37986        let mut payload_buf = [0; Self::ENCODED_LEN];
37987        let mut buf = if avail_len < Self::ENCODED_LEN {
37988            payload_buf[0..avail_len].copy_from_slice(__input);
37989            Bytes::new(&payload_buf)
37990        } else {
37991            Bytes::new(__input)
37992        };
37993        let mut __struct = Self::default();
37994        __struct.mag_ofs_x = buf.get_i16_le()?;
37995        __struct.mag_ofs_y = buf.get_i16_le()?;
37996        __struct.mag_ofs_z = buf.get_i16_le()?;
37997        __struct.target_system = buf.get_u8()?;
37998        __struct.target_component = buf.get_u8()?;
37999        Ok(__struct)
38000    }
38001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
38002        let mut __tmp = BytesMut::new(bytes);
38003        #[allow(clippy::absurd_extreme_comparisons)]
38004        #[allow(unused_comparisons)]
38005        if __tmp.remaining() < Self::ENCODED_LEN {
38006            panic!(
38007                "buffer is too small (need {} bytes, but got {})",
38008                Self::ENCODED_LEN,
38009                __tmp.remaining(),
38010            )
38011        }
38012        __tmp.put_i16_le(self.mag_ofs_x);
38013        __tmp.put_i16_le(self.mag_ofs_y);
38014        __tmp.put_i16_le(self.mag_ofs_z);
38015        __tmp.put_u8(self.target_system);
38016        __tmp.put_u8(self.target_component);
38017        if matches!(version, MavlinkVersion::V2) {
38018            let len = __tmp.len();
38019            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
38020        } else {
38021            __tmp.len()
38022        }
38023    }
38024}
38025#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
38026#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
38027#[doc = ""]
38028#[doc = "ID: 11"]
38029#[derive(Debug, Clone, PartialEq)]
38030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
38031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
38032#[cfg_attr(feature = "ts", derive(TS))]
38033#[cfg_attr(feature = "ts", ts(export))]
38034pub struct SET_MODE_DATA {
38035    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
38036    pub custom_mode: u32,
38037    #[doc = "The system setting the mode"]
38038    pub target_system: u8,
38039    #[doc = "The new base mode."]
38040    pub base_mode: MavMode,
38041}
38042impl SET_MODE_DATA {
38043    pub const ENCODED_LEN: usize = 6usize;
38044    pub const DEFAULT: Self = Self {
38045        custom_mode: 0_u32,
38046        target_system: 0_u8,
38047        base_mode: MavMode::DEFAULT,
38048    };
38049    #[cfg(feature = "arbitrary")]
38050    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
38051        use arbitrary::{Arbitrary, Unstructured};
38052        let mut buf = [0u8; 1024];
38053        rng.fill_bytes(&mut buf);
38054        let mut unstructured = Unstructured::new(&buf);
38055        Self::arbitrary(&mut unstructured).unwrap_or_default()
38056    }
38057}
38058impl Default for SET_MODE_DATA {
38059    fn default() -> Self {
38060        Self::DEFAULT.clone()
38061    }
38062}
38063impl MessageData for SET_MODE_DATA {
38064    type Message = MavMessage;
38065    const ID: u32 = 11u32;
38066    const NAME: &'static str = "SET_MODE";
38067    const EXTRA_CRC: u8 = 89u8;
38068    const ENCODED_LEN: usize = 6usize;
38069    fn deser(
38070        _version: MavlinkVersion,
38071        __input: &[u8],
38072    ) -> Result<Self, ::mavlink_core::error::ParserError> {
38073        let avail_len = __input.len();
38074        let mut payload_buf = [0; Self::ENCODED_LEN];
38075        let mut buf = if avail_len < Self::ENCODED_LEN {
38076            payload_buf[0..avail_len].copy_from_slice(__input);
38077            Bytes::new(&payload_buf)
38078        } else {
38079            Bytes::new(__input)
38080        };
38081        let mut __struct = Self::default();
38082        __struct.custom_mode = buf.get_u32_le()?;
38083        __struct.target_system = buf.get_u8()?;
38084        let tmp = buf.get_u8()?;
38085        __struct.base_mode =
38086            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
38087                enum_type: "MavMode",
38088                value: tmp as u64,
38089            })?;
38090        Ok(__struct)
38091    }
38092    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
38093        let mut __tmp = BytesMut::new(bytes);
38094        #[allow(clippy::absurd_extreme_comparisons)]
38095        #[allow(unused_comparisons)]
38096        if __tmp.remaining() < Self::ENCODED_LEN {
38097            panic!(
38098                "buffer is too small (need {} bytes, but got {})",
38099                Self::ENCODED_LEN,
38100                __tmp.remaining(),
38101            )
38102        }
38103        __tmp.put_u32_le(self.custom_mode);
38104        __tmp.put_u8(self.target_system);
38105        __tmp.put_u8(self.base_mode as u8);
38106        if matches!(version, MavlinkVersion::V2) {
38107            let len = __tmp.len();
38108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
38109        } else {
38110            __tmp.len()
38111        }
38112    }
38113}
38114#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
38115#[doc = ""]
38116#[doc = "ID: 86"]
38117#[derive(Debug, Clone, PartialEq)]
38118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
38119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
38120#[cfg_attr(feature = "ts", derive(TS))]
38121#[cfg_attr(feature = "ts", ts(export))]
38122pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
38123    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
38124    pub time_boot_ms: u32,
38125    #[doc = "Latitude in WGS84 frame"]
38126    pub lat_int: i32,
38127    #[doc = "Longitude in WGS84 frame"]
38128    pub lon_int: i32,
38129    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
38130    pub alt: f32,
38131    #[doc = "X velocity in NED frame"]
38132    pub vx: f32,
38133    #[doc = "Y velocity in NED frame"]
38134    pub vy: f32,
38135    #[doc = "Z velocity in NED frame"]
38136    pub vz: f32,
38137    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
38138    pub afx: f32,
38139    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
38140    pub afy: f32,
38141    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
38142    pub afz: f32,
38143    #[doc = "yaw setpoint"]
38144    pub yaw: f32,
38145    #[doc = "yaw rate setpoint"]
38146    pub yaw_rate: f32,
38147    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
38148    pub type_mask: PositionTargetTypemask,
38149    #[doc = "System ID"]
38150    pub target_system: u8,
38151    #[doc = "Component ID"]
38152    pub target_component: u8,
38153    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
38154    pub coordinate_frame: MavFrame,
38155}
38156impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
38157    pub const ENCODED_LEN: usize = 53usize;
38158    pub const DEFAULT: Self = Self {
38159        time_boot_ms: 0_u32,
38160        lat_int: 0_i32,
38161        lon_int: 0_i32,
38162        alt: 0.0_f32,
38163        vx: 0.0_f32,
38164        vy: 0.0_f32,
38165        vz: 0.0_f32,
38166        afx: 0.0_f32,
38167        afy: 0.0_f32,
38168        afz: 0.0_f32,
38169        yaw: 0.0_f32,
38170        yaw_rate: 0.0_f32,
38171        type_mask: PositionTargetTypemask::DEFAULT,
38172        target_system: 0_u8,
38173        target_component: 0_u8,
38174        coordinate_frame: MavFrame::DEFAULT,
38175    };
38176    #[cfg(feature = "arbitrary")]
38177    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
38178        use arbitrary::{Arbitrary, Unstructured};
38179        let mut buf = [0u8; 1024];
38180        rng.fill_bytes(&mut buf);
38181        let mut unstructured = Unstructured::new(&buf);
38182        Self::arbitrary(&mut unstructured).unwrap_or_default()
38183    }
38184}
38185impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
38186    fn default() -> Self {
38187        Self::DEFAULT.clone()
38188    }
38189}
38190impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
38191    type Message = MavMessage;
38192    const ID: u32 = 86u32;
38193    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
38194    const EXTRA_CRC: u8 = 5u8;
38195    const ENCODED_LEN: usize = 53usize;
38196    fn deser(
38197        _version: MavlinkVersion,
38198        __input: &[u8],
38199    ) -> Result<Self, ::mavlink_core::error::ParserError> {
38200        let avail_len = __input.len();
38201        let mut payload_buf = [0; Self::ENCODED_LEN];
38202        let mut buf = if avail_len < Self::ENCODED_LEN {
38203            payload_buf[0..avail_len].copy_from_slice(__input);
38204            Bytes::new(&payload_buf)
38205        } else {
38206            Bytes::new(__input)
38207        };
38208        let mut __struct = Self::default();
38209        __struct.time_boot_ms = buf.get_u32_le()?;
38210        __struct.lat_int = buf.get_i32_le()?;
38211        __struct.lon_int = buf.get_i32_le()?;
38212        __struct.alt = buf.get_f32_le()?;
38213        __struct.vx = buf.get_f32_le()?;
38214        __struct.vy = buf.get_f32_le()?;
38215        __struct.vz = buf.get_f32_le()?;
38216        __struct.afx = buf.get_f32_le()?;
38217        __struct.afy = buf.get_f32_le()?;
38218        __struct.afz = buf.get_f32_le()?;
38219        __struct.yaw = buf.get_f32_le()?;
38220        __struct.yaw_rate = buf.get_f32_le()?;
38221        let tmp = buf.get_u16_le()?;
38222        __struct.type_mask =
38223            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
38224                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
38225                    flag_type: "PositionTargetTypemask",
38226                    value: tmp as u64,
38227                })?;
38228        __struct.target_system = buf.get_u8()?;
38229        __struct.target_component = buf.get_u8()?;
38230        let tmp = buf.get_u8()?;
38231        __struct.coordinate_frame =
38232            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
38233                enum_type: "MavFrame",
38234                value: tmp as u64,
38235            })?;
38236        Ok(__struct)
38237    }
38238    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
38239        let mut __tmp = BytesMut::new(bytes);
38240        #[allow(clippy::absurd_extreme_comparisons)]
38241        #[allow(unused_comparisons)]
38242        if __tmp.remaining() < Self::ENCODED_LEN {
38243            panic!(
38244                "buffer is too small (need {} bytes, but got {})",
38245                Self::ENCODED_LEN,
38246                __tmp.remaining(),
38247            )
38248        }
38249        __tmp.put_u32_le(self.time_boot_ms);
38250        __tmp.put_i32_le(self.lat_int);
38251        __tmp.put_i32_le(self.lon_int);
38252        __tmp.put_f32_le(self.alt);
38253        __tmp.put_f32_le(self.vx);
38254        __tmp.put_f32_le(self.vy);
38255        __tmp.put_f32_le(self.vz);
38256        __tmp.put_f32_le(self.afx);
38257        __tmp.put_f32_le(self.afy);
38258        __tmp.put_f32_le(self.afz);
38259        __tmp.put_f32_le(self.yaw);
38260        __tmp.put_f32_le(self.yaw_rate);
38261        __tmp.put_u16_le(self.type_mask.bits() as u16);
38262        __tmp.put_u8(self.target_system);
38263        __tmp.put_u8(self.target_component);
38264        __tmp.put_u8(self.coordinate_frame as u8);
38265        if matches!(version, MavlinkVersion::V2) {
38266            let len = __tmp.len();
38267            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
38268        } else {
38269            __tmp.len()
38270        }
38271    }
38272}
38273#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
38274#[doc = ""]
38275#[doc = "ID: 84"]
38276#[derive(Debug, Clone, PartialEq)]
38277#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
38278#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
38279#[cfg_attr(feature = "ts", derive(TS))]
38280#[cfg_attr(feature = "ts", ts(export))]
38281pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
38282    #[doc = "Timestamp (time since system boot)."]
38283    pub time_boot_ms: u32,
38284    #[doc = "X Position in NED frame"]
38285    pub x: f32,
38286    #[doc = "Y Position in NED frame"]
38287    pub y: f32,
38288    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
38289    pub z: f32,
38290    #[doc = "X velocity in NED frame"]
38291    pub vx: f32,
38292    #[doc = "Y velocity in NED frame"]
38293    pub vy: f32,
38294    #[doc = "Z velocity in NED frame"]
38295    pub vz: f32,
38296    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
38297    pub afx: f32,
38298    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
38299    pub afy: f32,
38300    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
38301    pub afz: f32,
38302    #[doc = "yaw setpoint"]
38303    pub yaw: f32,
38304    #[doc = "yaw rate setpoint"]
38305    pub yaw_rate: f32,
38306    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
38307    pub type_mask: PositionTargetTypemask,
38308    #[doc = "System ID"]
38309    pub target_system: u8,
38310    #[doc = "Component ID"]
38311    pub target_component: u8,
38312    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
38313    pub coordinate_frame: MavFrame,
38314}
38315impl SET_POSITION_TARGET_LOCAL_NED_DATA {
38316    pub const ENCODED_LEN: usize = 53usize;
38317    pub const DEFAULT: Self = Self {
38318        time_boot_ms: 0_u32,
38319        x: 0.0_f32,
38320        y: 0.0_f32,
38321        z: 0.0_f32,
38322        vx: 0.0_f32,
38323        vy: 0.0_f32,
38324        vz: 0.0_f32,
38325        afx: 0.0_f32,
38326        afy: 0.0_f32,
38327        afz: 0.0_f32,
38328        yaw: 0.0_f32,
38329        yaw_rate: 0.0_f32,
38330        type_mask: PositionTargetTypemask::DEFAULT,
38331        target_system: 0_u8,
38332        target_component: 0_u8,
38333        coordinate_frame: MavFrame::DEFAULT,
38334    };
38335    #[cfg(feature = "arbitrary")]
38336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
38337        use arbitrary::{Arbitrary, Unstructured};
38338        let mut buf = [0u8; 1024];
38339        rng.fill_bytes(&mut buf);
38340        let mut unstructured = Unstructured::new(&buf);
38341        Self::arbitrary(&mut unstructured).unwrap_or_default()
38342    }
38343}
38344impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
38345    fn default() -> Self {
38346        Self::DEFAULT.clone()
38347    }
38348}
38349impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
38350    type Message = MavMessage;
38351    const ID: u32 = 84u32;
38352    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
38353    const EXTRA_CRC: u8 = 143u8;
38354    const ENCODED_LEN: usize = 53usize;
38355    fn deser(
38356        _version: MavlinkVersion,
38357        __input: &[u8],
38358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
38359        let avail_len = __input.len();
38360        let mut payload_buf = [0; Self::ENCODED_LEN];
38361        let mut buf = if avail_len < Self::ENCODED_LEN {
38362            payload_buf[0..avail_len].copy_from_slice(__input);
38363            Bytes::new(&payload_buf)
38364        } else {
38365            Bytes::new(__input)
38366        };
38367        let mut __struct = Self::default();
38368        __struct.time_boot_ms = buf.get_u32_le()?;
38369        __struct.x = buf.get_f32_le()?;
38370        __struct.y = buf.get_f32_le()?;
38371        __struct.z = buf.get_f32_le()?;
38372        __struct.vx = buf.get_f32_le()?;
38373        __struct.vy = buf.get_f32_le()?;
38374        __struct.vz = buf.get_f32_le()?;
38375        __struct.afx = buf.get_f32_le()?;
38376        __struct.afy = buf.get_f32_le()?;
38377        __struct.afz = buf.get_f32_le()?;
38378        __struct.yaw = buf.get_f32_le()?;
38379        __struct.yaw_rate = buf.get_f32_le()?;
38380        let tmp = buf.get_u16_le()?;
38381        __struct.type_mask =
38382            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
38383                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
38384                    flag_type: "PositionTargetTypemask",
38385                    value: tmp as u64,
38386                })?;
38387        __struct.target_system = buf.get_u8()?;
38388        __struct.target_component = buf.get_u8()?;
38389        let tmp = buf.get_u8()?;
38390        __struct.coordinate_frame =
38391            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
38392                enum_type: "MavFrame",
38393                value: tmp as u64,
38394            })?;
38395        Ok(__struct)
38396    }
38397    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
38398        let mut __tmp = BytesMut::new(bytes);
38399        #[allow(clippy::absurd_extreme_comparisons)]
38400        #[allow(unused_comparisons)]
38401        if __tmp.remaining() < Self::ENCODED_LEN {
38402            panic!(
38403                "buffer is too small (need {} bytes, but got {})",
38404                Self::ENCODED_LEN,
38405                __tmp.remaining(),
38406            )
38407        }
38408        __tmp.put_u32_le(self.time_boot_ms);
38409        __tmp.put_f32_le(self.x);
38410        __tmp.put_f32_le(self.y);
38411        __tmp.put_f32_le(self.z);
38412        __tmp.put_f32_le(self.vx);
38413        __tmp.put_f32_le(self.vy);
38414        __tmp.put_f32_le(self.vz);
38415        __tmp.put_f32_le(self.afx);
38416        __tmp.put_f32_le(self.afy);
38417        __tmp.put_f32_le(self.afz);
38418        __tmp.put_f32_le(self.yaw);
38419        __tmp.put_f32_le(self.yaw_rate);
38420        __tmp.put_u16_le(self.type_mask.bits() as u16);
38421        __tmp.put_u8(self.target_system);
38422        __tmp.put_u8(self.target_component);
38423        __tmp.put_u8(self.coordinate_frame as u8);
38424        if matches!(version, MavlinkVersion::V2) {
38425            let len = __tmp.len();
38426            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
38427        } else {
38428            __tmp.len()
38429        }
38430    }
38431}
38432#[doc = "Status of simulation environment, if used."]
38433#[doc = ""]
38434#[doc = "ID: 164"]
38435#[derive(Debug, Clone, PartialEq)]
38436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
38437#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
38438#[cfg_attr(feature = "ts", derive(TS))]
38439#[cfg_attr(feature = "ts", ts(export))]
38440pub struct SIMSTATE_DATA {
38441    #[doc = "Roll angle."]
38442    pub roll: f32,
38443    #[doc = "Pitch angle."]
38444    pub pitch: f32,
38445    #[doc = "Yaw angle."]
38446    pub yaw: f32,
38447    #[doc = "X acceleration."]
38448    pub xacc: f32,
38449    #[doc = "Y acceleration."]
38450    pub yacc: f32,
38451    #[doc = "Z acceleration."]
38452    pub zacc: f32,
38453    #[doc = "Angular speed around X axis."]
38454    pub xgyro: f32,
38455    #[doc = "Angular speed around Y axis."]
38456    pub ygyro: f32,
38457    #[doc = "Angular speed around Z axis."]
38458    pub zgyro: f32,
38459    #[doc = "Latitude."]
38460    pub lat: i32,
38461    #[doc = "Longitude."]
38462    pub lng: i32,
38463}
38464impl SIMSTATE_DATA {
38465    pub const ENCODED_LEN: usize = 44usize;
38466    pub const DEFAULT: Self = Self {
38467        roll: 0.0_f32,
38468        pitch: 0.0_f32,
38469        yaw: 0.0_f32,
38470        xacc: 0.0_f32,
38471        yacc: 0.0_f32,
38472        zacc: 0.0_f32,
38473        xgyro: 0.0_f32,
38474        ygyro: 0.0_f32,
38475        zgyro: 0.0_f32,
38476        lat: 0_i32,
38477        lng: 0_i32,
38478    };
38479    #[cfg(feature = "arbitrary")]
38480    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
38481        use arbitrary::{Arbitrary, Unstructured};
38482        let mut buf = [0u8; 1024];
38483        rng.fill_bytes(&mut buf);
38484        let mut unstructured = Unstructured::new(&buf);
38485        Self::arbitrary(&mut unstructured).unwrap_or_default()
38486    }
38487}
38488impl Default for SIMSTATE_DATA {
38489    fn default() -> Self {
38490        Self::DEFAULT.clone()
38491    }
38492}
38493impl MessageData for SIMSTATE_DATA {
38494    type Message = MavMessage;
38495    const ID: u32 = 164u32;
38496    const NAME: &'static str = "SIMSTATE";
38497    const EXTRA_CRC: u8 = 154u8;
38498    const ENCODED_LEN: usize = 44usize;
38499    fn deser(
38500        _version: MavlinkVersion,
38501        __input: &[u8],
38502    ) -> Result<Self, ::mavlink_core::error::ParserError> {
38503        let avail_len = __input.len();
38504        let mut payload_buf = [0; Self::ENCODED_LEN];
38505        let mut buf = if avail_len < Self::ENCODED_LEN {
38506            payload_buf[0..avail_len].copy_from_slice(__input);
38507            Bytes::new(&payload_buf)
38508        } else {
38509            Bytes::new(__input)
38510        };
38511        let mut __struct = Self::default();
38512        __struct.roll = buf.get_f32_le()?;
38513        __struct.pitch = buf.get_f32_le()?;
38514        __struct.yaw = buf.get_f32_le()?;
38515        __struct.xacc = buf.get_f32_le()?;
38516        __struct.yacc = buf.get_f32_le()?;
38517        __struct.zacc = buf.get_f32_le()?;
38518        __struct.xgyro = buf.get_f32_le()?;
38519        __struct.ygyro = buf.get_f32_le()?;
38520        __struct.zgyro = buf.get_f32_le()?;
38521        __struct.lat = buf.get_i32_le()?;
38522        __struct.lng = buf.get_i32_le()?;
38523        Ok(__struct)
38524    }
38525    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
38526        let mut __tmp = BytesMut::new(bytes);
38527        #[allow(clippy::absurd_extreme_comparisons)]
38528        #[allow(unused_comparisons)]
38529        if __tmp.remaining() < Self::ENCODED_LEN {
38530            panic!(
38531                "buffer is too small (need {} bytes, but got {})",
38532                Self::ENCODED_LEN,
38533                __tmp.remaining(),
38534            )
38535        }
38536        __tmp.put_f32_le(self.roll);
38537        __tmp.put_f32_le(self.pitch);
38538        __tmp.put_f32_le(self.yaw);
38539        __tmp.put_f32_le(self.xacc);
38540        __tmp.put_f32_le(self.yacc);
38541        __tmp.put_f32_le(self.zacc);
38542        __tmp.put_f32_le(self.xgyro);
38543        __tmp.put_f32_le(self.ygyro);
38544        __tmp.put_f32_le(self.zgyro);
38545        __tmp.put_i32_le(self.lat);
38546        __tmp.put_i32_le(self.lng);
38547        if matches!(version, MavlinkVersion::V2) {
38548            let len = __tmp.len();
38549            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
38550        } else {
38551            __tmp.len()
38552        }
38553    }
38554}
38555#[doc = "Status of simulation environment, if used."]
38556#[doc = ""]
38557#[doc = "ID: 108"]
38558#[derive(Debug, Clone, PartialEq)]
38559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
38560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
38561#[cfg_attr(feature = "ts", derive(TS))]
38562#[cfg_attr(feature = "ts", ts(export))]
38563pub struct SIM_STATE_DATA {
38564    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
38565    pub q1: f32,
38566    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
38567    pub q2: f32,
38568    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
38569    pub q3: f32,
38570    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
38571    pub q4: f32,
38572    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
38573    pub roll: f32,
38574    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
38575    pub pitch: f32,
38576    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
38577    pub yaw: f32,
38578    #[doc = "X acceleration"]
38579    pub xacc: f32,
38580    #[doc = "Y acceleration"]
38581    pub yacc: f32,
38582    #[doc = "Z acceleration"]
38583    pub zacc: f32,
38584    #[doc = "Angular speed around X axis"]
38585    pub xgyro: f32,
38586    #[doc = "Angular speed around Y axis"]
38587    pub ygyro: f32,
38588    #[doc = "Angular speed around Z axis"]
38589    pub zgyro: f32,
38590    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
38591    pub lat: f32,
38592    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
38593    pub lon: f32,
38594    #[doc = "Altitude"]
38595    pub alt: f32,
38596    #[doc = "Horizontal position standard deviation"]
38597    pub std_dev_horz: f32,
38598    #[doc = "Vertical position standard deviation"]
38599    pub std_dev_vert: f32,
38600    #[doc = "True velocity in north direction in earth-fixed NED frame"]
38601    pub vn: f32,
38602    #[doc = "True velocity in east direction in earth-fixed NED frame"]
38603    pub ve: f32,
38604    #[doc = "True velocity in down direction in earth-fixed NED frame"]
38605    pub vd: f32,
38606    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
38607    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
38608    pub lat_int: i32,
38609    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
38610    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
38611    pub lon_int: i32,
38612}
38613impl SIM_STATE_DATA {
38614    pub const ENCODED_LEN: usize = 92usize;
38615    pub const DEFAULT: Self = Self {
38616        q1: 0.0_f32,
38617        q2: 0.0_f32,
38618        q3: 0.0_f32,
38619        q4: 0.0_f32,
38620        roll: 0.0_f32,
38621        pitch: 0.0_f32,
38622        yaw: 0.0_f32,
38623        xacc: 0.0_f32,
38624        yacc: 0.0_f32,
38625        zacc: 0.0_f32,
38626        xgyro: 0.0_f32,
38627        ygyro: 0.0_f32,
38628        zgyro: 0.0_f32,
38629        lat: 0.0_f32,
38630        lon: 0.0_f32,
38631        alt: 0.0_f32,
38632        std_dev_horz: 0.0_f32,
38633        std_dev_vert: 0.0_f32,
38634        vn: 0.0_f32,
38635        ve: 0.0_f32,
38636        vd: 0.0_f32,
38637        lat_int: 0_i32,
38638        lon_int: 0_i32,
38639    };
38640    #[cfg(feature = "arbitrary")]
38641    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
38642        use arbitrary::{Arbitrary, Unstructured};
38643        let mut buf = [0u8; 1024];
38644        rng.fill_bytes(&mut buf);
38645        let mut unstructured = Unstructured::new(&buf);
38646        Self::arbitrary(&mut unstructured).unwrap_or_default()
38647    }
38648}
38649impl Default for SIM_STATE_DATA {
38650    fn default() -> Self {
38651        Self::DEFAULT.clone()
38652    }
38653}
38654impl MessageData for SIM_STATE_DATA {
38655    type Message = MavMessage;
38656    const ID: u32 = 108u32;
38657    const NAME: &'static str = "SIM_STATE";
38658    const EXTRA_CRC: u8 = 32u8;
38659    const ENCODED_LEN: usize = 92usize;
38660    fn deser(
38661        _version: MavlinkVersion,
38662        __input: &[u8],
38663    ) -> Result<Self, ::mavlink_core::error::ParserError> {
38664        let avail_len = __input.len();
38665        let mut payload_buf = [0; Self::ENCODED_LEN];
38666        let mut buf = if avail_len < Self::ENCODED_LEN {
38667            payload_buf[0..avail_len].copy_from_slice(__input);
38668            Bytes::new(&payload_buf)
38669        } else {
38670            Bytes::new(__input)
38671        };
38672        let mut __struct = Self::default();
38673        __struct.q1 = buf.get_f32_le()?;
38674        __struct.q2 = buf.get_f32_le()?;
38675        __struct.q3 = buf.get_f32_le()?;
38676        __struct.q4 = buf.get_f32_le()?;
38677        __struct.roll = buf.get_f32_le()?;
38678        __struct.pitch = buf.get_f32_le()?;
38679        __struct.yaw = buf.get_f32_le()?;
38680        __struct.xacc = buf.get_f32_le()?;
38681        __struct.yacc = buf.get_f32_le()?;
38682        __struct.zacc = buf.get_f32_le()?;
38683        __struct.xgyro = buf.get_f32_le()?;
38684        __struct.ygyro = buf.get_f32_le()?;
38685        __struct.zgyro = buf.get_f32_le()?;
38686        __struct.lat = buf.get_f32_le()?;
38687        __struct.lon = buf.get_f32_le()?;
38688        __struct.alt = buf.get_f32_le()?;
38689        __struct.std_dev_horz = buf.get_f32_le()?;
38690        __struct.std_dev_vert = buf.get_f32_le()?;
38691        __struct.vn = buf.get_f32_le()?;
38692        __struct.ve = buf.get_f32_le()?;
38693        __struct.vd = buf.get_f32_le()?;
38694        __struct.lat_int = buf.get_i32_le()?;
38695        __struct.lon_int = buf.get_i32_le()?;
38696        Ok(__struct)
38697    }
38698    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
38699        let mut __tmp = BytesMut::new(bytes);
38700        #[allow(clippy::absurd_extreme_comparisons)]
38701        #[allow(unused_comparisons)]
38702        if __tmp.remaining() < Self::ENCODED_LEN {
38703            panic!(
38704                "buffer is too small (need {} bytes, but got {})",
38705                Self::ENCODED_LEN,
38706                __tmp.remaining(),
38707            )
38708        }
38709        __tmp.put_f32_le(self.q1);
38710        __tmp.put_f32_le(self.q2);
38711        __tmp.put_f32_le(self.q3);
38712        __tmp.put_f32_le(self.q4);
38713        __tmp.put_f32_le(self.roll);
38714        __tmp.put_f32_le(self.pitch);
38715        __tmp.put_f32_le(self.yaw);
38716        __tmp.put_f32_le(self.xacc);
38717        __tmp.put_f32_le(self.yacc);
38718        __tmp.put_f32_le(self.zacc);
38719        __tmp.put_f32_le(self.xgyro);
38720        __tmp.put_f32_le(self.ygyro);
38721        __tmp.put_f32_le(self.zgyro);
38722        __tmp.put_f32_le(self.lat);
38723        __tmp.put_f32_le(self.lon);
38724        __tmp.put_f32_le(self.alt);
38725        __tmp.put_f32_le(self.std_dev_horz);
38726        __tmp.put_f32_le(self.std_dev_vert);
38727        __tmp.put_f32_le(self.vn);
38728        __tmp.put_f32_le(self.ve);
38729        __tmp.put_f32_le(self.vd);
38730        if matches!(version, MavlinkVersion::V2) {
38731            __tmp.put_i32_le(self.lat_int);
38732            __tmp.put_i32_le(self.lon_int);
38733            let len = __tmp.len();
38734            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
38735        } else {
38736            __tmp.len()
38737        }
38738    }
38739}
38740#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
38741#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
38742#[doc = ""]
38743#[doc = "ID: 370"]
38744#[derive(Debug, Clone, PartialEq)]
38745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
38746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
38747#[cfg_attr(feature = "ts", derive(TS))]
38748#[cfg_attr(feature = "ts", ts(export))]
38749pub struct SMART_BATTERY_INFO_DATA {
38750    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
38751    pub capacity_full_specification: i32,
38752    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
38753    pub capacity_full: i32,
38754    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
38755    pub cycle_count: u16,
38756    #[doc = "Battery weight. 0: field not provided."]
38757    pub weight: u16,
38758    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
38759    pub discharge_minimum_voltage: u16,
38760    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
38761    pub charging_minimum_voltage: u16,
38762    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
38763    pub resting_minimum_voltage: u16,
38764    #[doc = "Battery ID"]
38765    pub id: u8,
38766    #[doc = "Function of the battery"]
38767    pub battery_function: MavBatteryFunction,
38768    #[doc = "Type (chemistry) of the battery"]
38769    pub mavtype: MavBatteryType,
38770    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
38771    #[cfg_attr(feature = "ts", ts(type = "string"))]
38772    pub serial_number: CharArray<16>,
38773    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
38774    #[cfg_attr(feature = "ts", ts(type = "string"))]
38775    pub device_name: CharArray<50>,
38776    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
38777    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
38778    pub charging_maximum_voltage: u16,
38779    #[doc = "Number of battery cells in series. 0: field not provided."]
38780    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
38781    pub cells_in_series: u8,
38782    #[doc = "Maximum pack discharge current. 0: field not provided."]
38783    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
38784    pub discharge_maximum_current: u32,
38785    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
38786    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
38787    pub discharge_maximum_burst_current: u32,
38788    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
38789    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
38790    #[cfg_attr(feature = "ts", ts(type = "string"))]
38791    pub manufacture_date: CharArray<11>,
38792}
38793impl SMART_BATTERY_INFO_DATA {
38794    pub const ENCODED_LEN: usize = 109usize;
38795    pub const DEFAULT: Self = Self {
38796        capacity_full_specification: 0_i32,
38797        capacity_full: 0_i32,
38798        cycle_count: 0_u16,
38799        weight: 0_u16,
38800        discharge_minimum_voltage: 0_u16,
38801        charging_minimum_voltage: 0_u16,
38802        resting_minimum_voltage: 0_u16,
38803        id: 0_u8,
38804        battery_function: MavBatteryFunction::DEFAULT,
38805        mavtype: MavBatteryType::DEFAULT,
38806        serial_number: CharArray::new([0_u8; 16usize]),
38807        device_name: CharArray::new([0_u8; 50usize]),
38808        charging_maximum_voltage: 0_u16,
38809        cells_in_series: 0_u8,
38810        discharge_maximum_current: 0_u32,
38811        discharge_maximum_burst_current: 0_u32,
38812        manufacture_date: CharArray::new([0_u8; 11usize]),
38813    };
38814    #[cfg(feature = "arbitrary")]
38815    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
38816        use arbitrary::{Arbitrary, Unstructured};
38817        let mut buf = [0u8; 1024];
38818        rng.fill_bytes(&mut buf);
38819        let mut unstructured = Unstructured::new(&buf);
38820        Self::arbitrary(&mut unstructured).unwrap_or_default()
38821    }
38822}
38823impl Default for SMART_BATTERY_INFO_DATA {
38824    fn default() -> Self {
38825        Self::DEFAULT.clone()
38826    }
38827}
38828impl MessageData for SMART_BATTERY_INFO_DATA {
38829    type Message = MavMessage;
38830    const ID: u32 = 370u32;
38831    const NAME: &'static str = "SMART_BATTERY_INFO";
38832    const EXTRA_CRC: u8 = 75u8;
38833    const ENCODED_LEN: usize = 109usize;
38834    fn deser(
38835        _version: MavlinkVersion,
38836        __input: &[u8],
38837    ) -> Result<Self, ::mavlink_core::error::ParserError> {
38838        let avail_len = __input.len();
38839        let mut payload_buf = [0; Self::ENCODED_LEN];
38840        let mut buf = if avail_len < Self::ENCODED_LEN {
38841            payload_buf[0..avail_len].copy_from_slice(__input);
38842            Bytes::new(&payload_buf)
38843        } else {
38844            Bytes::new(__input)
38845        };
38846        let mut __struct = Self::default();
38847        __struct.capacity_full_specification = buf.get_i32_le()?;
38848        __struct.capacity_full = buf.get_i32_le()?;
38849        __struct.cycle_count = buf.get_u16_le()?;
38850        __struct.weight = buf.get_u16_le()?;
38851        __struct.discharge_minimum_voltage = buf.get_u16_le()?;
38852        __struct.charging_minimum_voltage = buf.get_u16_le()?;
38853        __struct.resting_minimum_voltage = buf.get_u16_le()?;
38854        __struct.id = buf.get_u8()?;
38855        let tmp = buf.get_u8()?;
38856        __struct.battery_function =
38857            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
38858                enum_type: "MavBatteryFunction",
38859                value: tmp as u64,
38860            })?;
38861        let tmp = buf.get_u8()?;
38862        __struct.mavtype =
38863            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
38864                enum_type: "MavBatteryType",
38865                value: tmp as u64,
38866            })?;
38867        let mut tmp = [0_u8; 16usize];
38868        for v in &mut tmp {
38869            *v = buf.get_u8()?;
38870        }
38871        __struct.serial_number = CharArray::new(tmp);
38872        let mut tmp = [0_u8; 50usize];
38873        for v in &mut tmp {
38874            *v = buf.get_u8()?;
38875        }
38876        __struct.device_name = CharArray::new(tmp);
38877        __struct.charging_maximum_voltage = buf.get_u16_le()?;
38878        __struct.cells_in_series = buf.get_u8()?;
38879        __struct.discharge_maximum_current = buf.get_u32_le()?;
38880        __struct.discharge_maximum_burst_current = buf.get_u32_le()?;
38881        let mut tmp = [0_u8; 11usize];
38882        for v in &mut tmp {
38883            *v = buf.get_u8()?;
38884        }
38885        __struct.manufacture_date = CharArray::new(tmp);
38886        Ok(__struct)
38887    }
38888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
38889        let mut __tmp = BytesMut::new(bytes);
38890        #[allow(clippy::absurd_extreme_comparisons)]
38891        #[allow(unused_comparisons)]
38892        if __tmp.remaining() < Self::ENCODED_LEN {
38893            panic!(
38894                "buffer is too small (need {} bytes, but got {})",
38895                Self::ENCODED_LEN,
38896                __tmp.remaining(),
38897            )
38898        }
38899        __tmp.put_i32_le(self.capacity_full_specification);
38900        __tmp.put_i32_le(self.capacity_full);
38901        __tmp.put_u16_le(self.cycle_count);
38902        __tmp.put_u16_le(self.weight);
38903        __tmp.put_u16_le(self.discharge_minimum_voltage);
38904        __tmp.put_u16_le(self.charging_minimum_voltage);
38905        __tmp.put_u16_le(self.resting_minimum_voltage);
38906        __tmp.put_u8(self.id);
38907        __tmp.put_u8(self.battery_function as u8);
38908        __tmp.put_u8(self.mavtype as u8);
38909        for val in &self.serial_number {
38910            __tmp.put_u8(*val);
38911        }
38912        for val in &self.device_name {
38913            __tmp.put_u8(*val);
38914        }
38915        if matches!(version, MavlinkVersion::V2) {
38916            __tmp.put_u16_le(self.charging_maximum_voltage);
38917            __tmp.put_u8(self.cells_in_series);
38918            __tmp.put_u32_le(self.discharge_maximum_current);
38919            __tmp.put_u32_le(self.discharge_maximum_burst_current);
38920            for val in &self.manufacture_date {
38921                __tmp.put_u8(*val);
38922            }
38923            let len = __tmp.len();
38924            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
38925        } else {
38926            __tmp.len()
38927        }
38928    }
38929}
38930#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
38931#[doc = ""]
38932#[doc = "ID: 253"]
38933#[derive(Debug, Clone, PartialEq)]
38934#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
38935#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
38936#[cfg_attr(feature = "ts", derive(TS))]
38937#[cfg_attr(feature = "ts", ts(export))]
38938pub struct STATUSTEXT_DATA {
38939    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
38940    pub severity: MavSeverity,
38941    #[doc = "Status text message, without null termination character"]
38942    #[cfg_attr(feature = "ts", ts(type = "string"))]
38943    pub text: CharArray<50>,
38944    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
38945    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
38946    pub id: u16,
38947    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
38948    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
38949    pub chunk_seq: u8,
38950}
38951impl STATUSTEXT_DATA {
38952    pub const ENCODED_LEN: usize = 54usize;
38953    pub const DEFAULT: Self = Self {
38954        severity: MavSeverity::DEFAULT,
38955        text: CharArray::new([0_u8; 50usize]),
38956        id: 0_u16,
38957        chunk_seq: 0_u8,
38958    };
38959    #[cfg(feature = "arbitrary")]
38960    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
38961        use arbitrary::{Arbitrary, Unstructured};
38962        let mut buf = [0u8; 1024];
38963        rng.fill_bytes(&mut buf);
38964        let mut unstructured = Unstructured::new(&buf);
38965        Self::arbitrary(&mut unstructured).unwrap_or_default()
38966    }
38967}
38968impl Default for STATUSTEXT_DATA {
38969    fn default() -> Self {
38970        Self::DEFAULT.clone()
38971    }
38972}
38973impl MessageData for STATUSTEXT_DATA {
38974    type Message = MavMessage;
38975    const ID: u32 = 253u32;
38976    const NAME: &'static str = "STATUSTEXT";
38977    const EXTRA_CRC: u8 = 83u8;
38978    const ENCODED_LEN: usize = 54usize;
38979    fn deser(
38980        _version: MavlinkVersion,
38981        __input: &[u8],
38982    ) -> Result<Self, ::mavlink_core::error::ParserError> {
38983        let avail_len = __input.len();
38984        let mut payload_buf = [0; Self::ENCODED_LEN];
38985        let mut buf = if avail_len < Self::ENCODED_LEN {
38986            payload_buf[0..avail_len].copy_from_slice(__input);
38987            Bytes::new(&payload_buf)
38988        } else {
38989            Bytes::new(__input)
38990        };
38991        let mut __struct = Self::default();
38992        let tmp = buf.get_u8()?;
38993        __struct.severity =
38994            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
38995                enum_type: "MavSeverity",
38996                value: tmp as u64,
38997            })?;
38998        let mut tmp = [0_u8; 50usize];
38999        for v in &mut tmp {
39000            *v = buf.get_u8()?;
39001        }
39002        __struct.text = CharArray::new(tmp);
39003        __struct.id = buf.get_u16_le()?;
39004        __struct.chunk_seq = buf.get_u8()?;
39005        Ok(__struct)
39006    }
39007    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
39008        let mut __tmp = BytesMut::new(bytes);
39009        #[allow(clippy::absurd_extreme_comparisons)]
39010        #[allow(unused_comparisons)]
39011        if __tmp.remaining() < Self::ENCODED_LEN {
39012            panic!(
39013                "buffer is too small (need {} bytes, but got {})",
39014                Self::ENCODED_LEN,
39015                __tmp.remaining(),
39016            )
39017        }
39018        __tmp.put_u8(self.severity as u8);
39019        for val in &self.text {
39020            __tmp.put_u8(*val);
39021        }
39022        if matches!(version, MavlinkVersion::V2) {
39023            __tmp.put_u16_le(self.id);
39024            __tmp.put_u8(self.chunk_seq);
39025            let len = __tmp.len();
39026            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
39027        } else {
39028            __tmp.len()
39029        }
39030    }
39031}
39032#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
39033#[doc = ""]
39034#[doc = "ID: 261"]
39035#[derive(Debug, Clone, PartialEq)]
39036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
39037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
39038#[cfg_attr(feature = "ts", derive(TS))]
39039#[cfg_attr(feature = "ts", ts(export))]
39040pub struct STORAGE_INFORMATION_DATA {
39041    #[doc = "Timestamp (time since system boot)."]
39042    pub time_boot_ms: u32,
39043    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
39044    pub total_capacity: f32,
39045    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
39046    pub used_capacity: f32,
39047    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
39048    pub available_capacity: f32,
39049    #[doc = "Read speed."]
39050    pub read_speed: f32,
39051    #[doc = "Write speed."]
39052    pub write_speed: f32,
39053    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
39054    pub storage_id: u8,
39055    #[doc = "Number of storage devices"]
39056    pub storage_count: u8,
39057    #[doc = "Status of storage"]
39058    pub status: StorageStatus,
39059    #[doc = "Type of storage"]
39060    #[cfg_attr(feature = "serde", serde(default))]
39061    pub mavtype: StorageType,
39062    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
39063    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
39064    #[cfg_attr(feature = "ts", ts(type = "string"))]
39065    pub name: CharArray<32>,
39066    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
39067    #[cfg_attr(feature = "serde", serde(default))]
39068    pub storage_usage: StorageUsageFlag,
39069}
39070impl STORAGE_INFORMATION_DATA {
39071    pub const ENCODED_LEN: usize = 61usize;
39072    pub const DEFAULT: Self = Self {
39073        time_boot_ms: 0_u32,
39074        total_capacity: 0.0_f32,
39075        used_capacity: 0.0_f32,
39076        available_capacity: 0.0_f32,
39077        read_speed: 0.0_f32,
39078        write_speed: 0.0_f32,
39079        storage_id: 0_u8,
39080        storage_count: 0_u8,
39081        status: StorageStatus::DEFAULT,
39082        mavtype: StorageType::DEFAULT,
39083        name: CharArray::new([0_u8; 32usize]),
39084        storage_usage: StorageUsageFlag::DEFAULT,
39085    };
39086    #[cfg(feature = "arbitrary")]
39087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
39088        use arbitrary::{Arbitrary, Unstructured};
39089        let mut buf = [0u8; 1024];
39090        rng.fill_bytes(&mut buf);
39091        let mut unstructured = Unstructured::new(&buf);
39092        Self::arbitrary(&mut unstructured).unwrap_or_default()
39093    }
39094}
39095impl Default for STORAGE_INFORMATION_DATA {
39096    fn default() -> Self {
39097        Self::DEFAULT.clone()
39098    }
39099}
39100impl MessageData for STORAGE_INFORMATION_DATA {
39101    type Message = MavMessage;
39102    const ID: u32 = 261u32;
39103    const NAME: &'static str = "STORAGE_INFORMATION";
39104    const EXTRA_CRC: u8 = 179u8;
39105    const ENCODED_LEN: usize = 61usize;
39106    fn deser(
39107        _version: MavlinkVersion,
39108        __input: &[u8],
39109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
39110        let avail_len = __input.len();
39111        let mut payload_buf = [0; Self::ENCODED_LEN];
39112        let mut buf = if avail_len < Self::ENCODED_LEN {
39113            payload_buf[0..avail_len].copy_from_slice(__input);
39114            Bytes::new(&payload_buf)
39115        } else {
39116            Bytes::new(__input)
39117        };
39118        let mut __struct = Self::default();
39119        __struct.time_boot_ms = buf.get_u32_le()?;
39120        __struct.total_capacity = buf.get_f32_le()?;
39121        __struct.used_capacity = buf.get_f32_le()?;
39122        __struct.available_capacity = buf.get_f32_le()?;
39123        __struct.read_speed = buf.get_f32_le()?;
39124        __struct.write_speed = buf.get_f32_le()?;
39125        __struct.storage_id = buf.get_u8()?;
39126        __struct.storage_count = buf.get_u8()?;
39127        let tmp = buf.get_u8()?;
39128        __struct.status =
39129            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
39130                enum_type: "StorageStatus",
39131                value: tmp as u64,
39132            })?;
39133        let tmp = buf.get_u8()?;
39134        __struct.mavtype =
39135            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
39136                enum_type: "StorageType",
39137                value: tmp as u64,
39138            })?;
39139        let mut tmp = [0_u8; 32usize];
39140        for v in &mut tmp {
39141            *v = buf.get_u8()?;
39142        }
39143        __struct.name = CharArray::new(tmp);
39144        let tmp = buf.get_u8()?;
39145        __struct.storage_usage = StorageUsageFlag::from_bits(
39146            tmp as <StorageUsageFlag as Flags>::Bits,
39147        )
39148        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
39149            flag_type: "StorageUsageFlag",
39150            value: tmp as u64,
39151        })?;
39152        Ok(__struct)
39153    }
39154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
39155        let mut __tmp = BytesMut::new(bytes);
39156        #[allow(clippy::absurd_extreme_comparisons)]
39157        #[allow(unused_comparisons)]
39158        if __tmp.remaining() < Self::ENCODED_LEN {
39159            panic!(
39160                "buffer is too small (need {} bytes, but got {})",
39161                Self::ENCODED_LEN,
39162                __tmp.remaining(),
39163            )
39164        }
39165        __tmp.put_u32_le(self.time_boot_ms);
39166        __tmp.put_f32_le(self.total_capacity);
39167        __tmp.put_f32_le(self.used_capacity);
39168        __tmp.put_f32_le(self.available_capacity);
39169        __tmp.put_f32_le(self.read_speed);
39170        __tmp.put_f32_le(self.write_speed);
39171        __tmp.put_u8(self.storage_id);
39172        __tmp.put_u8(self.storage_count);
39173        __tmp.put_u8(self.status as u8);
39174        if matches!(version, MavlinkVersion::V2) {
39175            __tmp.put_u8(self.mavtype as u8);
39176            for val in &self.name {
39177                __tmp.put_u8(*val);
39178            }
39179            __tmp.put_u8(self.storage_usage.bits() as u8);
39180            let len = __tmp.len();
39181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
39182        } else {
39183            __tmp.len()
39184        }
39185    }
39186}
39187#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
39188#[doc = ""]
39189#[doc = "ID: 401"]
39190#[derive(Debug, Clone, PartialEq)]
39191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
39192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
39193#[cfg_attr(feature = "ts", derive(TS))]
39194#[cfg_attr(feature = "ts", ts(export))]
39195pub struct SUPPORTED_TUNES_DATA {
39196    #[doc = "Bitfield of supported tune formats."]
39197    pub format: TuneFormat,
39198    #[doc = "System ID"]
39199    pub target_system: u8,
39200    #[doc = "Component ID"]
39201    pub target_component: u8,
39202}
39203impl SUPPORTED_TUNES_DATA {
39204    pub const ENCODED_LEN: usize = 6usize;
39205    pub const DEFAULT: Self = Self {
39206        format: TuneFormat::DEFAULT,
39207        target_system: 0_u8,
39208        target_component: 0_u8,
39209    };
39210    #[cfg(feature = "arbitrary")]
39211    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
39212        use arbitrary::{Arbitrary, Unstructured};
39213        let mut buf = [0u8; 1024];
39214        rng.fill_bytes(&mut buf);
39215        let mut unstructured = Unstructured::new(&buf);
39216        Self::arbitrary(&mut unstructured).unwrap_or_default()
39217    }
39218}
39219impl Default for SUPPORTED_TUNES_DATA {
39220    fn default() -> Self {
39221        Self::DEFAULT.clone()
39222    }
39223}
39224impl MessageData for SUPPORTED_TUNES_DATA {
39225    type Message = MavMessage;
39226    const ID: u32 = 401u32;
39227    const NAME: &'static str = "SUPPORTED_TUNES";
39228    const EXTRA_CRC: u8 = 183u8;
39229    const ENCODED_LEN: usize = 6usize;
39230    fn deser(
39231        _version: MavlinkVersion,
39232        __input: &[u8],
39233    ) -> Result<Self, ::mavlink_core::error::ParserError> {
39234        let avail_len = __input.len();
39235        let mut payload_buf = [0; Self::ENCODED_LEN];
39236        let mut buf = if avail_len < Self::ENCODED_LEN {
39237            payload_buf[0..avail_len].copy_from_slice(__input);
39238            Bytes::new(&payload_buf)
39239        } else {
39240            Bytes::new(__input)
39241        };
39242        let mut __struct = Self::default();
39243        let tmp = buf.get_u32_le()?;
39244        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
39245            ::mavlink_core::error::ParserError::InvalidEnum {
39246                enum_type: "TuneFormat",
39247                value: tmp as u64,
39248            },
39249        )?;
39250        __struct.target_system = buf.get_u8()?;
39251        __struct.target_component = buf.get_u8()?;
39252        Ok(__struct)
39253    }
39254    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
39255        let mut __tmp = BytesMut::new(bytes);
39256        #[allow(clippy::absurd_extreme_comparisons)]
39257        #[allow(unused_comparisons)]
39258        if __tmp.remaining() < Self::ENCODED_LEN {
39259            panic!(
39260                "buffer is too small (need {} bytes, but got {})",
39261                Self::ENCODED_LEN,
39262                __tmp.remaining(),
39263            )
39264        }
39265        __tmp.put_u32_le(self.format as u32);
39266        __tmp.put_u8(self.target_system);
39267        __tmp.put_u8(self.target_component);
39268        if matches!(version, MavlinkVersion::V2) {
39269            let len = __tmp.len();
39270            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
39271        } else {
39272            __tmp.len()
39273        }
39274    }
39275}
39276#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
39277#[doc = ""]
39278#[doc = "ID: 2"]
39279#[derive(Debug, Clone, PartialEq)]
39280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
39281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
39282#[cfg_attr(feature = "ts", derive(TS))]
39283#[cfg_attr(feature = "ts", ts(export))]
39284pub struct SYSTEM_TIME_DATA {
39285    #[doc = "Timestamp (UNIX epoch time)."]
39286    pub time_unix_usec: u64,
39287    #[doc = "Timestamp (time since system boot)."]
39288    pub time_boot_ms: u32,
39289}
39290impl SYSTEM_TIME_DATA {
39291    pub const ENCODED_LEN: usize = 12usize;
39292    pub const DEFAULT: Self = Self {
39293        time_unix_usec: 0_u64,
39294        time_boot_ms: 0_u32,
39295    };
39296    #[cfg(feature = "arbitrary")]
39297    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
39298        use arbitrary::{Arbitrary, Unstructured};
39299        let mut buf = [0u8; 1024];
39300        rng.fill_bytes(&mut buf);
39301        let mut unstructured = Unstructured::new(&buf);
39302        Self::arbitrary(&mut unstructured).unwrap_or_default()
39303    }
39304}
39305impl Default for SYSTEM_TIME_DATA {
39306    fn default() -> Self {
39307        Self::DEFAULT.clone()
39308    }
39309}
39310impl MessageData for SYSTEM_TIME_DATA {
39311    type Message = MavMessage;
39312    const ID: u32 = 2u32;
39313    const NAME: &'static str = "SYSTEM_TIME";
39314    const EXTRA_CRC: u8 = 137u8;
39315    const ENCODED_LEN: usize = 12usize;
39316    fn deser(
39317        _version: MavlinkVersion,
39318        __input: &[u8],
39319    ) -> Result<Self, ::mavlink_core::error::ParserError> {
39320        let avail_len = __input.len();
39321        let mut payload_buf = [0; Self::ENCODED_LEN];
39322        let mut buf = if avail_len < Self::ENCODED_LEN {
39323            payload_buf[0..avail_len].copy_from_slice(__input);
39324            Bytes::new(&payload_buf)
39325        } else {
39326            Bytes::new(__input)
39327        };
39328        let mut __struct = Self::default();
39329        __struct.time_unix_usec = buf.get_u64_le()?;
39330        __struct.time_boot_ms = buf.get_u32_le()?;
39331        Ok(__struct)
39332    }
39333    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
39334        let mut __tmp = BytesMut::new(bytes);
39335        #[allow(clippy::absurd_extreme_comparisons)]
39336        #[allow(unused_comparisons)]
39337        if __tmp.remaining() < Self::ENCODED_LEN {
39338            panic!(
39339                "buffer is too small (need {} bytes, but got {})",
39340                Self::ENCODED_LEN,
39341                __tmp.remaining(),
39342            )
39343        }
39344        __tmp.put_u64_le(self.time_unix_usec);
39345        __tmp.put_u32_le(self.time_boot_ms);
39346        if matches!(version, MavlinkVersion::V2) {
39347            let len = __tmp.len();
39348            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
39349        } else {
39350            __tmp.len()
39351        }
39352    }
39353}
39354#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
39355#[doc = ""]
39356#[doc = "ID: 1"]
39357#[derive(Debug, Clone, PartialEq)]
39358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
39359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
39360#[cfg_attr(feature = "ts", derive(TS))]
39361#[cfg_attr(feature = "ts", ts(export))]
39362pub struct SYS_STATUS_DATA {
39363    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
39364    pub onboard_control_sensors_present: MavSysStatusSensor,
39365    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
39366    pub onboard_control_sensors_enabled: MavSysStatusSensor,
39367    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
39368    pub onboard_control_sensors_health: MavSysStatusSensor,
39369    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
39370    pub load: u16,
39371    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
39372    pub voltage_battery: u16,
39373    #[doc = "Battery current, -1: Current not sent by autopilot"]
39374    pub current_battery: i16,
39375    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
39376    pub drop_rate_comm: u16,
39377    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
39378    pub errors_comm: u16,
39379    #[doc = "Autopilot-specific errors"]
39380    pub errors_count1: u16,
39381    #[doc = "Autopilot-specific errors"]
39382    pub errors_count2: u16,
39383    #[doc = "Autopilot-specific errors"]
39384    pub errors_count3: u16,
39385    #[doc = "Autopilot-specific errors"]
39386    pub errors_count4: u16,
39387    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
39388    pub battery_remaining: i8,
39389    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
39390    #[cfg_attr(feature = "serde", serde(default))]
39391    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
39392    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
39393    #[cfg_attr(feature = "serde", serde(default))]
39394    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
39395    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
39396    #[cfg_attr(feature = "serde", serde(default))]
39397    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
39398}
39399impl SYS_STATUS_DATA {
39400    pub const ENCODED_LEN: usize = 43usize;
39401    pub const DEFAULT: Self = Self {
39402        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
39403        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
39404        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
39405        load: 0_u16,
39406        voltage_battery: 0_u16,
39407        current_battery: 0_i16,
39408        drop_rate_comm: 0_u16,
39409        errors_comm: 0_u16,
39410        errors_count1: 0_u16,
39411        errors_count2: 0_u16,
39412        errors_count3: 0_u16,
39413        errors_count4: 0_u16,
39414        battery_remaining: 0_i8,
39415        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
39416        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
39417        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
39418    };
39419    #[cfg(feature = "arbitrary")]
39420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
39421        use arbitrary::{Arbitrary, Unstructured};
39422        let mut buf = [0u8; 1024];
39423        rng.fill_bytes(&mut buf);
39424        let mut unstructured = Unstructured::new(&buf);
39425        Self::arbitrary(&mut unstructured).unwrap_or_default()
39426    }
39427}
39428impl Default for SYS_STATUS_DATA {
39429    fn default() -> Self {
39430        Self::DEFAULT.clone()
39431    }
39432}
39433impl MessageData for SYS_STATUS_DATA {
39434    type Message = MavMessage;
39435    const ID: u32 = 1u32;
39436    const NAME: &'static str = "SYS_STATUS";
39437    const EXTRA_CRC: u8 = 124u8;
39438    const ENCODED_LEN: usize = 43usize;
39439    fn deser(
39440        _version: MavlinkVersion,
39441        __input: &[u8],
39442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
39443        let avail_len = __input.len();
39444        let mut payload_buf = [0; Self::ENCODED_LEN];
39445        let mut buf = if avail_len < Self::ENCODED_LEN {
39446            payload_buf[0..avail_len].copy_from_slice(__input);
39447            Bytes::new(&payload_buf)
39448        } else {
39449            Bytes::new(__input)
39450        };
39451        let mut __struct = Self::default();
39452        let tmp = buf.get_u32_le()?;
39453        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
39454            tmp as <MavSysStatusSensor as Flags>::Bits,
39455        )
39456        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
39457            flag_type: "MavSysStatusSensor",
39458            value: tmp as u64,
39459        })?;
39460        let tmp = buf.get_u32_le()?;
39461        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
39462            tmp as <MavSysStatusSensor as Flags>::Bits,
39463        )
39464        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
39465            flag_type: "MavSysStatusSensor",
39466            value: tmp as u64,
39467        })?;
39468        let tmp = buf.get_u32_le()?;
39469        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
39470            tmp as <MavSysStatusSensor as Flags>::Bits,
39471        )
39472        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
39473            flag_type: "MavSysStatusSensor",
39474            value: tmp as u64,
39475        })?;
39476        __struct.load = buf.get_u16_le()?;
39477        __struct.voltage_battery = buf.get_u16_le()?;
39478        __struct.current_battery = buf.get_i16_le()?;
39479        __struct.drop_rate_comm = buf.get_u16_le()?;
39480        __struct.errors_comm = buf.get_u16_le()?;
39481        __struct.errors_count1 = buf.get_u16_le()?;
39482        __struct.errors_count2 = buf.get_u16_le()?;
39483        __struct.errors_count3 = buf.get_u16_le()?;
39484        __struct.errors_count4 = buf.get_u16_le()?;
39485        __struct.battery_remaining = buf.get_i8()?;
39486        let tmp = buf.get_u32_le()?;
39487        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
39488            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
39489        )
39490        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
39491            flag_type: "MavSysStatusSensorExtended",
39492            value: tmp as u64,
39493        })?;
39494        let tmp = buf.get_u32_le()?;
39495        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
39496            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
39497        )
39498        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
39499            flag_type: "MavSysStatusSensorExtended",
39500            value: tmp as u64,
39501        })?;
39502        let tmp = buf.get_u32_le()?;
39503        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
39504            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
39505        )
39506        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
39507            flag_type: "MavSysStatusSensorExtended",
39508            value: tmp as u64,
39509        })?;
39510        Ok(__struct)
39511    }
39512    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
39513        let mut __tmp = BytesMut::new(bytes);
39514        #[allow(clippy::absurd_extreme_comparisons)]
39515        #[allow(unused_comparisons)]
39516        if __tmp.remaining() < Self::ENCODED_LEN {
39517            panic!(
39518                "buffer is too small (need {} bytes, but got {})",
39519                Self::ENCODED_LEN,
39520                __tmp.remaining(),
39521            )
39522        }
39523        __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
39524        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
39525        __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
39526        __tmp.put_u16_le(self.load);
39527        __tmp.put_u16_le(self.voltage_battery);
39528        __tmp.put_i16_le(self.current_battery);
39529        __tmp.put_u16_le(self.drop_rate_comm);
39530        __tmp.put_u16_le(self.errors_comm);
39531        __tmp.put_u16_le(self.errors_count1);
39532        __tmp.put_u16_le(self.errors_count2);
39533        __tmp.put_u16_le(self.errors_count3);
39534        __tmp.put_u16_le(self.errors_count4);
39535        __tmp.put_i8(self.battery_remaining);
39536        if matches!(version, MavlinkVersion::V2) {
39537            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
39538            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
39539            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
39540            let len = __tmp.len();
39541            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
39542        } else {
39543            __tmp.len()
39544        }
39545    }
39546}
39547#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
39548#[doc = ""]
39549#[doc = "ID: 135"]
39550#[derive(Debug, Clone, PartialEq)]
39551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
39552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
39553#[cfg_attr(feature = "ts", derive(TS))]
39554#[cfg_attr(feature = "ts", ts(export))]
39555pub struct TERRAIN_CHECK_DATA {
39556    #[doc = "Latitude"]
39557    pub lat: i32,
39558    #[doc = "Longitude"]
39559    pub lon: i32,
39560}
39561impl TERRAIN_CHECK_DATA {
39562    pub const ENCODED_LEN: usize = 8usize;
39563    pub const DEFAULT: Self = Self {
39564        lat: 0_i32,
39565        lon: 0_i32,
39566    };
39567    #[cfg(feature = "arbitrary")]
39568    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
39569        use arbitrary::{Arbitrary, Unstructured};
39570        let mut buf = [0u8; 1024];
39571        rng.fill_bytes(&mut buf);
39572        let mut unstructured = Unstructured::new(&buf);
39573        Self::arbitrary(&mut unstructured).unwrap_or_default()
39574    }
39575}
39576impl Default for TERRAIN_CHECK_DATA {
39577    fn default() -> Self {
39578        Self::DEFAULT.clone()
39579    }
39580}
39581impl MessageData for TERRAIN_CHECK_DATA {
39582    type Message = MavMessage;
39583    const ID: u32 = 135u32;
39584    const NAME: &'static str = "TERRAIN_CHECK";
39585    const EXTRA_CRC: u8 = 203u8;
39586    const ENCODED_LEN: usize = 8usize;
39587    fn deser(
39588        _version: MavlinkVersion,
39589        __input: &[u8],
39590    ) -> Result<Self, ::mavlink_core::error::ParserError> {
39591        let avail_len = __input.len();
39592        let mut payload_buf = [0; Self::ENCODED_LEN];
39593        let mut buf = if avail_len < Self::ENCODED_LEN {
39594            payload_buf[0..avail_len].copy_from_slice(__input);
39595            Bytes::new(&payload_buf)
39596        } else {
39597            Bytes::new(__input)
39598        };
39599        let mut __struct = Self::default();
39600        __struct.lat = buf.get_i32_le()?;
39601        __struct.lon = buf.get_i32_le()?;
39602        Ok(__struct)
39603    }
39604    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
39605        let mut __tmp = BytesMut::new(bytes);
39606        #[allow(clippy::absurd_extreme_comparisons)]
39607        #[allow(unused_comparisons)]
39608        if __tmp.remaining() < Self::ENCODED_LEN {
39609            panic!(
39610                "buffer is too small (need {} bytes, but got {})",
39611                Self::ENCODED_LEN,
39612                __tmp.remaining(),
39613            )
39614        }
39615        __tmp.put_i32_le(self.lat);
39616        __tmp.put_i32_le(self.lon);
39617        if matches!(version, MavlinkVersion::V2) {
39618            let len = __tmp.len();
39619            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
39620        } else {
39621            __tmp.len()
39622        }
39623    }
39624}
39625#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
39626#[doc = ""]
39627#[doc = "ID: 134"]
39628#[derive(Debug, Clone, PartialEq)]
39629#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
39630#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
39631#[cfg_attr(feature = "ts", derive(TS))]
39632#[cfg_attr(feature = "ts", ts(export))]
39633pub struct TERRAIN_DATA_DATA {
39634    #[doc = "Latitude of SW corner of first grid"]
39635    pub lat: i32,
39636    #[doc = "Longitude of SW corner of first grid"]
39637    pub lon: i32,
39638    #[doc = "Grid spacing"]
39639    pub grid_spacing: u16,
39640    #[doc = "Terrain data MSL"]
39641    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
39642    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
39643    pub data: [i16; 16],
39644    #[doc = "bit within the terrain request mask"]
39645    pub gridbit: u8,
39646}
39647impl TERRAIN_DATA_DATA {
39648    pub const ENCODED_LEN: usize = 43usize;
39649    pub const DEFAULT: Self = Self {
39650        lat: 0_i32,
39651        lon: 0_i32,
39652        grid_spacing: 0_u16,
39653        data: [0_i16; 16usize],
39654        gridbit: 0_u8,
39655    };
39656    #[cfg(feature = "arbitrary")]
39657    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
39658        use arbitrary::{Arbitrary, Unstructured};
39659        let mut buf = [0u8; 1024];
39660        rng.fill_bytes(&mut buf);
39661        let mut unstructured = Unstructured::new(&buf);
39662        Self::arbitrary(&mut unstructured).unwrap_or_default()
39663    }
39664}
39665impl Default for TERRAIN_DATA_DATA {
39666    fn default() -> Self {
39667        Self::DEFAULT.clone()
39668    }
39669}
39670impl MessageData for TERRAIN_DATA_DATA {
39671    type Message = MavMessage;
39672    const ID: u32 = 134u32;
39673    const NAME: &'static str = "TERRAIN_DATA";
39674    const EXTRA_CRC: u8 = 229u8;
39675    const ENCODED_LEN: usize = 43usize;
39676    fn deser(
39677        _version: MavlinkVersion,
39678        __input: &[u8],
39679    ) -> Result<Self, ::mavlink_core::error::ParserError> {
39680        let avail_len = __input.len();
39681        let mut payload_buf = [0; Self::ENCODED_LEN];
39682        let mut buf = if avail_len < Self::ENCODED_LEN {
39683            payload_buf[0..avail_len].copy_from_slice(__input);
39684            Bytes::new(&payload_buf)
39685        } else {
39686            Bytes::new(__input)
39687        };
39688        let mut __struct = Self::default();
39689        __struct.lat = buf.get_i32_le()?;
39690        __struct.lon = buf.get_i32_le()?;
39691        __struct.grid_spacing = buf.get_u16_le()?;
39692        for v in &mut __struct.data {
39693            let val = buf.get_i16_le()?;
39694            *v = val;
39695        }
39696        __struct.gridbit = buf.get_u8()?;
39697        Ok(__struct)
39698    }
39699    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
39700        let mut __tmp = BytesMut::new(bytes);
39701        #[allow(clippy::absurd_extreme_comparisons)]
39702        #[allow(unused_comparisons)]
39703        if __tmp.remaining() < Self::ENCODED_LEN {
39704            panic!(
39705                "buffer is too small (need {} bytes, but got {})",
39706                Self::ENCODED_LEN,
39707                __tmp.remaining(),
39708            )
39709        }
39710        __tmp.put_i32_le(self.lat);
39711        __tmp.put_i32_le(self.lon);
39712        __tmp.put_u16_le(self.grid_spacing);
39713        for val in &self.data {
39714            __tmp.put_i16_le(*val);
39715        }
39716        __tmp.put_u8(self.gridbit);
39717        if matches!(version, MavlinkVersion::V2) {
39718            let len = __tmp.len();
39719            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
39720        } else {
39721            __tmp.len()
39722        }
39723    }
39724}
39725#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
39726#[doc = ""]
39727#[doc = "ID: 136"]
39728#[derive(Debug, Clone, PartialEq)]
39729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
39730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
39731#[cfg_attr(feature = "ts", derive(TS))]
39732#[cfg_attr(feature = "ts", ts(export))]
39733pub struct TERRAIN_REPORT_DATA {
39734    #[doc = "Latitude"]
39735    pub lat: i32,
39736    #[doc = "Longitude"]
39737    pub lon: i32,
39738    #[doc = "Terrain height MSL"]
39739    pub terrain_height: f32,
39740    #[doc = "Current vehicle height above lat/lon terrain height"]
39741    pub current_height: f32,
39742    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
39743    pub spacing: u16,
39744    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
39745    pub pending: u16,
39746    #[doc = "Number of 4x4 terrain blocks in memory"]
39747    pub loaded: u16,
39748}
39749impl TERRAIN_REPORT_DATA {
39750    pub const ENCODED_LEN: usize = 22usize;
39751    pub const DEFAULT: Self = Self {
39752        lat: 0_i32,
39753        lon: 0_i32,
39754        terrain_height: 0.0_f32,
39755        current_height: 0.0_f32,
39756        spacing: 0_u16,
39757        pending: 0_u16,
39758        loaded: 0_u16,
39759    };
39760    #[cfg(feature = "arbitrary")]
39761    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
39762        use arbitrary::{Arbitrary, Unstructured};
39763        let mut buf = [0u8; 1024];
39764        rng.fill_bytes(&mut buf);
39765        let mut unstructured = Unstructured::new(&buf);
39766        Self::arbitrary(&mut unstructured).unwrap_or_default()
39767    }
39768}
39769impl Default for TERRAIN_REPORT_DATA {
39770    fn default() -> Self {
39771        Self::DEFAULT.clone()
39772    }
39773}
39774impl MessageData for TERRAIN_REPORT_DATA {
39775    type Message = MavMessage;
39776    const ID: u32 = 136u32;
39777    const NAME: &'static str = "TERRAIN_REPORT";
39778    const EXTRA_CRC: u8 = 1u8;
39779    const ENCODED_LEN: usize = 22usize;
39780    fn deser(
39781        _version: MavlinkVersion,
39782        __input: &[u8],
39783    ) -> Result<Self, ::mavlink_core::error::ParserError> {
39784        let avail_len = __input.len();
39785        let mut payload_buf = [0; Self::ENCODED_LEN];
39786        let mut buf = if avail_len < Self::ENCODED_LEN {
39787            payload_buf[0..avail_len].copy_from_slice(__input);
39788            Bytes::new(&payload_buf)
39789        } else {
39790            Bytes::new(__input)
39791        };
39792        let mut __struct = Self::default();
39793        __struct.lat = buf.get_i32_le()?;
39794        __struct.lon = buf.get_i32_le()?;
39795        __struct.terrain_height = buf.get_f32_le()?;
39796        __struct.current_height = buf.get_f32_le()?;
39797        __struct.spacing = buf.get_u16_le()?;
39798        __struct.pending = buf.get_u16_le()?;
39799        __struct.loaded = buf.get_u16_le()?;
39800        Ok(__struct)
39801    }
39802    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
39803        let mut __tmp = BytesMut::new(bytes);
39804        #[allow(clippy::absurd_extreme_comparisons)]
39805        #[allow(unused_comparisons)]
39806        if __tmp.remaining() < Self::ENCODED_LEN {
39807            panic!(
39808                "buffer is too small (need {} bytes, but got {})",
39809                Self::ENCODED_LEN,
39810                __tmp.remaining(),
39811            )
39812        }
39813        __tmp.put_i32_le(self.lat);
39814        __tmp.put_i32_le(self.lon);
39815        __tmp.put_f32_le(self.terrain_height);
39816        __tmp.put_f32_le(self.current_height);
39817        __tmp.put_u16_le(self.spacing);
39818        __tmp.put_u16_le(self.pending);
39819        __tmp.put_u16_le(self.loaded);
39820        if matches!(version, MavlinkVersion::V2) {
39821            let len = __tmp.len();
39822            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
39823        } else {
39824            __tmp.len()
39825        }
39826    }
39827}
39828#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
39829#[doc = ""]
39830#[doc = "ID: 133"]
39831#[derive(Debug, Clone, PartialEq)]
39832#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
39833#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
39834#[cfg_attr(feature = "ts", derive(TS))]
39835#[cfg_attr(feature = "ts", ts(export))]
39836pub struct TERRAIN_REQUEST_DATA {
39837    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
39838    pub mask: u64,
39839    #[doc = "Latitude of SW corner of first grid"]
39840    pub lat: i32,
39841    #[doc = "Longitude of SW corner of first grid"]
39842    pub lon: i32,
39843    #[doc = "Grid spacing"]
39844    pub grid_spacing: u16,
39845}
39846impl TERRAIN_REQUEST_DATA {
39847    pub const ENCODED_LEN: usize = 18usize;
39848    pub const DEFAULT: Self = Self {
39849        mask: 0_u64,
39850        lat: 0_i32,
39851        lon: 0_i32,
39852        grid_spacing: 0_u16,
39853    };
39854    #[cfg(feature = "arbitrary")]
39855    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
39856        use arbitrary::{Arbitrary, Unstructured};
39857        let mut buf = [0u8; 1024];
39858        rng.fill_bytes(&mut buf);
39859        let mut unstructured = Unstructured::new(&buf);
39860        Self::arbitrary(&mut unstructured).unwrap_or_default()
39861    }
39862}
39863impl Default for TERRAIN_REQUEST_DATA {
39864    fn default() -> Self {
39865        Self::DEFAULT.clone()
39866    }
39867}
39868impl MessageData for TERRAIN_REQUEST_DATA {
39869    type Message = MavMessage;
39870    const ID: u32 = 133u32;
39871    const NAME: &'static str = "TERRAIN_REQUEST";
39872    const EXTRA_CRC: u8 = 6u8;
39873    const ENCODED_LEN: usize = 18usize;
39874    fn deser(
39875        _version: MavlinkVersion,
39876        __input: &[u8],
39877    ) -> Result<Self, ::mavlink_core::error::ParserError> {
39878        let avail_len = __input.len();
39879        let mut payload_buf = [0; Self::ENCODED_LEN];
39880        let mut buf = if avail_len < Self::ENCODED_LEN {
39881            payload_buf[0..avail_len].copy_from_slice(__input);
39882            Bytes::new(&payload_buf)
39883        } else {
39884            Bytes::new(__input)
39885        };
39886        let mut __struct = Self::default();
39887        __struct.mask = buf.get_u64_le()?;
39888        __struct.lat = buf.get_i32_le()?;
39889        __struct.lon = buf.get_i32_le()?;
39890        __struct.grid_spacing = buf.get_u16_le()?;
39891        Ok(__struct)
39892    }
39893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
39894        let mut __tmp = BytesMut::new(bytes);
39895        #[allow(clippy::absurd_extreme_comparisons)]
39896        #[allow(unused_comparisons)]
39897        if __tmp.remaining() < Self::ENCODED_LEN {
39898            panic!(
39899                "buffer is too small (need {} bytes, but got {})",
39900                Self::ENCODED_LEN,
39901                __tmp.remaining(),
39902            )
39903        }
39904        __tmp.put_u64_le(self.mask);
39905        __tmp.put_i32_le(self.lat);
39906        __tmp.put_i32_le(self.lon);
39907        __tmp.put_u16_le(self.grid_spacing);
39908        if matches!(version, MavlinkVersion::V2) {
39909            let len = __tmp.len();
39910            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
39911        } else {
39912            __tmp.len()
39913        }
39914    }
39915}
39916#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
39917#[doc = ""]
39918#[doc = "ID: 111"]
39919#[derive(Debug, Clone, PartialEq)]
39920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
39921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
39922#[cfg_attr(feature = "ts", derive(TS))]
39923#[cfg_attr(feature = "ts", ts(export))]
39924pub struct TIMESYNC_DATA {
39925    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
39926    pub tc1: i64,
39927    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
39928    pub ts1: i64,
39929    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
39930    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
39931    pub target_system: u8,
39932    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
39933    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
39934    pub target_component: u8,
39935}
39936impl TIMESYNC_DATA {
39937    pub const ENCODED_LEN: usize = 18usize;
39938    pub const DEFAULT: Self = Self {
39939        tc1: 0_i64,
39940        ts1: 0_i64,
39941        target_system: 0_u8,
39942        target_component: 0_u8,
39943    };
39944    #[cfg(feature = "arbitrary")]
39945    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
39946        use arbitrary::{Arbitrary, Unstructured};
39947        let mut buf = [0u8; 1024];
39948        rng.fill_bytes(&mut buf);
39949        let mut unstructured = Unstructured::new(&buf);
39950        Self::arbitrary(&mut unstructured).unwrap_or_default()
39951    }
39952}
39953impl Default for TIMESYNC_DATA {
39954    fn default() -> Self {
39955        Self::DEFAULT.clone()
39956    }
39957}
39958impl MessageData for TIMESYNC_DATA {
39959    type Message = MavMessage;
39960    const ID: u32 = 111u32;
39961    const NAME: &'static str = "TIMESYNC";
39962    const EXTRA_CRC: u8 = 34u8;
39963    const ENCODED_LEN: usize = 18usize;
39964    fn deser(
39965        _version: MavlinkVersion,
39966        __input: &[u8],
39967    ) -> Result<Self, ::mavlink_core::error::ParserError> {
39968        let avail_len = __input.len();
39969        let mut payload_buf = [0; Self::ENCODED_LEN];
39970        let mut buf = if avail_len < Self::ENCODED_LEN {
39971            payload_buf[0..avail_len].copy_from_slice(__input);
39972            Bytes::new(&payload_buf)
39973        } else {
39974            Bytes::new(__input)
39975        };
39976        let mut __struct = Self::default();
39977        __struct.tc1 = buf.get_i64_le()?;
39978        __struct.ts1 = buf.get_i64_le()?;
39979        __struct.target_system = buf.get_u8()?;
39980        __struct.target_component = buf.get_u8()?;
39981        Ok(__struct)
39982    }
39983    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
39984        let mut __tmp = BytesMut::new(bytes);
39985        #[allow(clippy::absurd_extreme_comparisons)]
39986        #[allow(unused_comparisons)]
39987        if __tmp.remaining() < Self::ENCODED_LEN {
39988            panic!(
39989                "buffer is too small (need {} bytes, but got {})",
39990                Self::ENCODED_LEN,
39991                __tmp.remaining(),
39992            )
39993        }
39994        __tmp.put_i64_le(self.tc1);
39995        __tmp.put_i64_le(self.ts1);
39996        if matches!(version, MavlinkVersion::V2) {
39997            __tmp.put_u8(self.target_system);
39998            __tmp.put_u8(self.target_component);
39999            let len = __tmp.len();
40000            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
40001        } else {
40002            __tmp.len()
40003        }
40004    }
40005}
40006#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
40007#[doc = ""]
40008#[doc = "ID: 380"]
40009#[derive(Debug, Clone, PartialEq)]
40010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
40011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
40012#[cfg_attr(feature = "ts", derive(TS))]
40013#[cfg_attr(feature = "ts", ts(export))]
40014pub struct TIME_ESTIMATE_TO_TARGET_DATA {
40015    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
40016    pub safe_return: i32,
40017    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
40018    pub land: i32,
40019    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
40020    pub mission_next_item: i32,
40021    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
40022    pub mission_end: i32,
40023    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
40024    pub commanded_action: i32,
40025}
40026impl TIME_ESTIMATE_TO_TARGET_DATA {
40027    pub const ENCODED_LEN: usize = 20usize;
40028    pub const DEFAULT: Self = Self {
40029        safe_return: 0_i32,
40030        land: 0_i32,
40031        mission_next_item: 0_i32,
40032        mission_end: 0_i32,
40033        commanded_action: 0_i32,
40034    };
40035    #[cfg(feature = "arbitrary")]
40036    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
40037        use arbitrary::{Arbitrary, Unstructured};
40038        let mut buf = [0u8; 1024];
40039        rng.fill_bytes(&mut buf);
40040        let mut unstructured = Unstructured::new(&buf);
40041        Self::arbitrary(&mut unstructured).unwrap_or_default()
40042    }
40043}
40044impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
40045    fn default() -> Self {
40046        Self::DEFAULT.clone()
40047    }
40048}
40049impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
40050    type Message = MavMessage;
40051    const ID: u32 = 380u32;
40052    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
40053    const EXTRA_CRC: u8 = 232u8;
40054    const ENCODED_LEN: usize = 20usize;
40055    fn deser(
40056        _version: MavlinkVersion,
40057        __input: &[u8],
40058    ) -> Result<Self, ::mavlink_core::error::ParserError> {
40059        let avail_len = __input.len();
40060        let mut payload_buf = [0; Self::ENCODED_LEN];
40061        let mut buf = if avail_len < Self::ENCODED_LEN {
40062            payload_buf[0..avail_len].copy_from_slice(__input);
40063            Bytes::new(&payload_buf)
40064        } else {
40065            Bytes::new(__input)
40066        };
40067        let mut __struct = Self::default();
40068        __struct.safe_return = buf.get_i32_le()?;
40069        __struct.land = buf.get_i32_le()?;
40070        __struct.mission_next_item = buf.get_i32_le()?;
40071        __struct.mission_end = buf.get_i32_le()?;
40072        __struct.commanded_action = buf.get_i32_le()?;
40073        Ok(__struct)
40074    }
40075    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
40076        let mut __tmp = BytesMut::new(bytes);
40077        #[allow(clippy::absurd_extreme_comparisons)]
40078        #[allow(unused_comparisons)]
40079        if __tmp.remaining() < Self::ENCODED_LEN {
40080            panic!(
40081                "buffer is too small (need {} bytes, but got {})",
40082                Self::ENCODED_LEN,
40083                __tmp.remaining(),
40084            )
40085        }
40086        __tmp.put_i32_le(self.safe_return);
40087        __tmp.put_i32_le(self.land);
40088        __tmp.put_i32_le(self.mission_next_item);
40089        __tmp.put_i32_le(self.mission_end);
40090        __tmp.put_i32_le(self.commanded_action);
40091        if matches!(version, MavlinkVersion::V2) {
40092            let len = __tmp.len();
40093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
40094        } else {
40095            __tmp.len()
40096        }
40097    }
40098}
40099#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
40100#[doc = ""]
40101#[doc = "ID: 333"]
40102#[derive(Debug, Clone, PartialEq)]
40103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
40104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
40105#[cfg_attr(feature = "ts", derive(TS))]
40106#[cfg_attr(feature = "ts", ts(export))]
40107pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
40108    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
40109    pub time_usec: u64,
40110    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
40111    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40112    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40113    pub pos_x: [f32; 5],
40114    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
40115    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40116    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40117    pub pos_y: [f32; 5],
40118    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
40119    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40120    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40121    pub pos_z: [f32; 5],
40122    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
40123    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40124    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40125    pub delta: [f32; 5],
40126    #[doc = "Yaw. Set to NaN for unchanged"]
40127    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40128    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40129    pub pos_yaw: [f32; 5],
40130    #[doc = "Number of valid control points (up-to 5 points are possible)"]
40131    pub valid_points: u8,
40132}
40133impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
40134    pub const ENCODED_LEN: usize = 109usize;
40135    pub const DEFAULT: Self = Self {
40136        time_usec: 0_u64,
40137        pos_x: [0.0_f32; 5usize],
40138        pos_y: [0.0_f32; 5usize],
40139        pos_z: [0.0_f32; 5usize],
40140        delta: [0.0_f32; 5usize],
40141        pos_yaw: [0.0_f32; 5usize],
40142        valid_points: 0_u8,
40143    };
40144    #[cfg(feature = "arbitrary")]
40145    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
40146        use arbitrary::{Arbitrary, Unstructured};
40147        let mut buf = [0u8; 1024];
40148        rng.fill_bytes(&mut buf);
40149        let mut unstructured = Unstructured::new(&buf);
40150        Self::arbitrary(&mut unstructured).unwrap_or_default()
40151    }
40152}
40153impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
40154    fn default() -> Self {
40155        Self::DEFAULT.clone()
40156    }
40157}
40158impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
40159    type Message = MavMessage;
40160    const ID: u32 = 333u32;
40161    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
40162    const EXTRA_CRC: u8 = 231u8;
40163    const ENCODED_LEN: usize = 109usize;
40164    fn deser(
40165        _version: MavlinkVersion,
40166        __input: &[u8],
40167    ) -> Result<Self, ::mavlink_core::error::ParserError> {
40168        let avail_len = __input.len();
40169        let mut payload_buf = [0; Self::ENCODED_LEN];
40170        let mut buf = if avail_len < Self::ENCODED_LEN {
40171            payload_buf[0..avail_len].copy_from_slice(__input);
40172            Bytes::new(&payload_buf)
40173        } else {
40174            Bytes::new(__input)
40175        };
40176        let mut __struct = Self::default();
40177        __struct.time_usec = buf.get_u64_le()?;
40178        for v in &mut __struct.pos_x {
40179            let val = buf.get_f32_le()?;
40180            *v = val;
40181        }
40182        for v in &mut __struct.pos_y {
40183            let val = buf.get_f32_le()?;
40184            *v = val;
40185        }
40186        for v in &mut __struct.pos_z {
40187            let val = buf.get_f32_le()?;
40188            *v = val;
40189        }
40190        for v in &mut __struct.delta {
40191            let val = buf.get_f32_le()?;
40192            *v = val;
40193        }
40194        for v in &mut __struct.pos_yaw {
40195            let val = buf.get_f32_le()?;
40196            *v = val;
40197        }
40198        __struct.valid_points = buf.get_u8()?;
40199        Ok(__struct)
40200    }
40201    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
40202        let mut __tmp = BytesMut::new(bytes);
40203        #[allow(clippy::absurd_extreme_comparisons)]
40204        #[allow(unused_comparisons)]
40205        if __tmp.remaining() < Self::ENCODED_LEN {
40206            panic!(
40207                "buffer is too small (need {} bytes, but got {})",
40208                Self::ENCODED_LEN,
40209                __tmp.remaining(),
40210            )
40211        }
40212        __tmp.put_u64_le(self.time_usec);
40213        for val in &self.pos_x {
40214            __tmp.put_f32_le(*val);
40215        }
40216        for val in &self.pos_y {
40217            __tmp.put_f32_le(*val);
40218        }
40219        for val in &self.pos_z {
40220            __tmp.put_f32_le(*val);
40221        }
40222        for val in &self.delta {
40223            __tmp.put_f32_le(*val);
40224        }
40225        for val in &self.pos_yaw {
40226            __tmp.put_f32_le(*val);
40227        }
40228        __tmp.put_u8(self.valid_points);
40229        if matches!(version, MavlinkVersion::V2) {
40230            let len = __tmp.len();
40231            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
40232        } else {
40233            __tmp.len()
40234        }
40235    }
40236}
40237#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
40238#[doc = ""]
40239#[doc = "ID: 332"]
40240#[derive(Debug, Clone, PartialEq)]
40241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
40242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
40243#[cfg_attr(feature = "ts", derive(TS))]
40244#[cfg_attr(feature = "ts", ts(export))]
40245pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
40246    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
40247    pub time_usec: u64,
40248    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
40249    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40250    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40251    pub pos_x: [f32; 5],
40252    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
40253    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40254    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40255    pub pos_y: [f32; 5],
40256    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
40257    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40258    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40259    pub pos_z: [f32; 5],
40260    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
40261    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40262    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40263    pub vel_x: [f32; 5],
40264    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
40265    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40266    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40267    pub vel_y: [f32; 5],
40268    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
40269    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40270    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40271    pub vel_z: [f32; 5],
40272    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
40273    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40274    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40275    pub acc_x: [f32; 5],
40276    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
40277    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40278    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40279    pub acc_y: [f32; 5],
40280    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
40281    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40282    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40283    pub acc_z: [f32; 5],
40284    #[doc = "Yaw angle, set to NaN if not being used"]
40285    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40286    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40287    pub pos_yaw: [f32; 5],
40288    #[doc = "Yaw rate, set to NaN if not being used"]
40289    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40290    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40291    pub vel_yaw: [f32; 5],
40292    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
40293    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40294    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40295    pub command: [u16; 5],
40296    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
40297    pub valid_points: u8,
40298}
40299impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
40300    pub const ENCODED_LEN: usize = 239usize;
40301    pub const DEFAULT: Self = Self {
40302        time_usec: 0_u64,
40303        pos_x: [0.0_f32; 5usize],
40304        pos_y: [0.0_f32; 5usize],
40305        pos_z: [0.0_f32; 5usize],
40306        vel_x: [0.0_f32; 5usize],
40307        vel_y: [0.0_f32; 5usize],
40308        vel_z: [0.0_f32; 5usize],
40309        acc_x: [0.0_f32; 5usize],
40310        acc_y: [0.0_f32; 5usize],
40311        acc_z: [0.0_f32; 5usize],
40312        pos_yaw: [0.0_f32; 5usize],
40313        vel_yaw: [0.0_f32; 5usize],
40314        command: [0_u16; 5usize],
40315        valid_points: 0_u8,
40316    };
40317    #[cfg(feature = "arbitrary")]
40318    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
40319        use arbitrary::{Arbitrary, Unstructured};
40320        let mut buf = [0u8; 1024];
40321        rng.fill_bytes(&mut buf);
40322        let mut unstructured = Unstructured::new(&buf);
40323        Self::arbitrary(&mut unstructured).unwrap_or_default()
40324    }
40325}
40326impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
40327    fn default() -> Self {
40328        Self::DEFAULT.clone()
40329    }
40330}
40331impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
40332    type Message = MavMessage;
40333    const ID: u32 = 332u32;
40334    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
40335    const EXTRA_CRC: u8 = 236u8;
40336    const ENCODED_LEN: usize = 239usize;
40337    fn deser(
40338        _version: MavlinkVersion,
40339        __input: &[u8],
40340    ) -> Result<Self, ::mavlink_core::error::ParserError> {
40341        let avail_len = __input.len();
40342        let mut payload_buf = [0; Self::ENCODED_LEN];
40343        let mut buf = if avail_len < Self::ENCODED_LEN {
40344            payload_buf[0..avail_len].copy_from_slice(__input);
40345            Bytes::new(&payload_buf)
40346        } else {
40347            Bytes::new(__input)
40348        };
40349        let mut __struct = Self::default();
40350        __struct.time_usec = buf.get_u64_le()?;
40351        for v in &mut __struct.pos_x {
40352            let val = buf.get_f32_le()?;
40353            *v = val;
40354        }
40355        for v in &mut __struct.pos_y {
40356            let val = buf.get_f32_le()?;
40357            *v = val;
40358        }
40359        for v in &mut __struct.pos_z {
40360            let val = buf.get_f32_le()?;
40361            *v = val;
40362        }
40363        for v in &mut __struct.vel_x {
40364            let val = buf.get_f32_le()?;
40365            *v = val;
40366        }
40367        for v in &mut __struct.vel_y {
40368            let val = buf.get_f32_le()?;
40369            *v = val;
40370        }
40371        for v in &mut __struct.vel_z {
40372            let val = buf.get_f32_le()?;
40373            *v = val;
40374        }
40375        for v in &mut __struct.acc_x {
40376            let val = buf.get_f32_le()?;
40377            *v = val;
40378        }
40379        for v in &mut __struct.acc_y {
40380            let val = buf.get_f32_le()?;
40381            *v = val;
40382        }
40383        for v in &mut __struct.acc_z {
40384            let val = buf.get_f32_le()?;
40385            *v = val;
40386        }
40387        for v in &mut __struct.pos_yaw {
40388            let val = buf.get_f32_le()?;
40389            *v = val;
40390        }
40391        for v in &mut __struct.vel_yaw {
40392            let val = buf.get_f32_le()?;
40393            *v = val;
40394        }
40395        for v in &mut __struct.command {
40396            let val = buf.get_u16_le()?;
40397            *v = val;
40398        }
40399        __struct.valid_points = buf.get_u8()?;
40400        Ok(__struct)
40401    }
40402    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
40403        let mut __tmp = BytesMut::new(bytes);
40404        #[allow(clippy::absurd_extreme_comparisons)]
40405        #[allow(unused_comparisons)]
40406        if __tmp.remaining() < Self::ENCODED_LEN {
40407            panic!(
40408                "buffer is too small (need {} bytes, but got {})",
40409                Self::ENCODED_LEN,
40410                __tmp.remaining(),
40411            )
40412        }
40413        __tmp.put_u64_le(self.time_usec);
40414        for val in &self.pos_x {
40415            __tmp.put_f32_le(*val);
40416        }
40417        for val in &self.pos_y {
40418            __tmp.put_f32_le(*val);
40419        }
40420        for val in &self.pos_z {
40421            __tmp.put_f32_le(*val);
40422        }
40423        for val in &self.vel_x {
40424            __tmp.put_f32_le(*val);
40425        }
40426        for val in &self.vel_y {
40427            __tmp.put_f32_le(*val);
40428        }
40429        for val in &self.vel_z {
40430            __tmp.put_f32_le(*val);
40431        }
40432        for val in &self.acc_x {
40433            __tmp.put_f32_le(*val);
40434        }
40435        for val in &self.acc_y {
40436            __tmp.put_f32_le(*val);
40437        }
40438        for val in &self.acc_z {
40439            __tmp.put_f32_le(*val);
40440        }
40441        for val in &self.pos_yaw {
40442            __tmp.put_f32_le(*val);
40443        }
40444        for val in &self.vel_yaw {
40445            __tmp.put_f32_le(*val);
40446        }
40447        for val in &self.command {
40448            __tmp.put_u16_le(*val);
40449        }
40450        __tmp.put_u8(self.valid_points);
40451        if matches!(version, MavlinkVersion::V2) {
40452            let len = __tmp.len();
40453            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
40454        } else {
40455            __tmp.len()
40456        }
40457    }
40458}
40459#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
40460#[doc = ""]
40461#[doc = "ID: 385"]
40462#[derive(Debug, Clone, PartialEq)]
40463#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
40464#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
40465#[cfg_attr(feature = "ts", derive(TS))]
40466#[cfg_attr(feature = "ts", ts(export))]
40467pub struct TUNNEL_DATA {
40468    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
40469    pub payload_type: MavTunnelPayloadType,
40470    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
40471    pub target_system: u8,
40472    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
40473    pub target_component: u8,
40474    #[doc = "Length of the data transported in payload"]
40475    pub payload_length: u8,
40476    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
40477    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40478    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40479    pub payload: [u8; 128],
40480}
40481impl TUNNEL_DATA {
40482    pub const ENCODED_LEN: usize = 133usize;
40483    pub const DEFAULT: Self = Self {
40484        payload_type: MavTunnelPayloadType::DEFAULT,
40485        target_system: 0_u8,
40486        target_component: 0_u8,
40487        payload_length: 0_u8,
40488        payload: [0_u8; 128usize],
40489    };
40490    #[cfg(feature = "arbitrary")]
40491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
40492        use arbitrary::{Arbitrary, Unstructured};
40493        let mut buf = [0u8; 1024];
40494        rng.fill_bytes(&mut buf);
40495        let mut unstructured = Unstructured::new(&buf);
40496        Self::arbitrary(&mut unstructured).unwrap_or_default()
40497    }
40498}
40499impl Default for TUNNEL_DATA {
40500    fn default() -> Self {
40501        Self::DEFAULT.clone()
40502    }
40503}
40504impl MessageData for TUNNEL_DATA {
40505    type Message = MavMessage;
40506    const ID: u32 = 385u32;
40507    const NAME: &'static str = "TUNNEL";
40508    const EXTRA_CRC: u8 = 147u8;
40509    const ENCODED_LEN: usize = 133usize;
40510    fn deser(
40511        _version: MavlinkVersion,
40512        __input: &[u8],
40513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
40514        let avail_len = __input.len();
40515        let mut payload_buf = [0; Self::ENCODED_LEN];
40516        let mut buf = if avail_len < Self::ENCODED_LEN {
40517            payload_buf[0..avail_len].copy_from_slice(__input);
40518            Bytes::new(&payload_buf)
40519        } else {
40520            Bytes::new(__input)
40521        };
40522        let mut __struct = Self::default();
40523        let tmp = buf.get_u16_le()?;
40524        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
40525            ::mavlink_core::error::ParserError::InvalidEnum {
40526                enum_type: "MavTunnelPayloadType",
40527                value: tmp as u64,
40528            },
40529        )?;
40530        __struct.target_system = buf.get_u8()?;
40531        __struct.target_component = buf.get_u8()?;
40532        __struct.payload_length = buf.get_u8()?;
40533        for v in &mut __struct.payload {
40534            let val = buf.get_u8()?;
40535            *v = val;
40536        }
40537        Ok(__struct)
40538    }
40539    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
40540        let mut __tmp = BytesMut::new(bytes);
40541        #[allow(clippy::absurd_extreme_comparisons)]
40542        #[allow(unused_comparisons)]
40543        if __tmp.remaining() < Self::ENCODED_LEN {
40544            panic!(
40545                "buffer is too small (need {} bytes, but got {})",
40546                Self::ENCODED_LEN,
40547                __tmp.remaining(),
40548            )
40549        }
40550        __tmp.put_u16_le(self.payload_type as u16);
40551        __tmp.put_u8(self.target_system);
40552        __tmp.put_u8(self.target_component);
40553        __tmp.put_u8(self.payload_length);
40554        for val in &self.payload {
40555            __tmp.put_u8(*val);
40556        }
40557        if matches!(version, MavlinkVersion::V2) {
40558            let len = __tmp.len();
40559            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
40560        } else {
40561            __tmp.len()
40562        }
40563    }
40564}
40565#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
40566#[doc = ""]
40567#[doc = "ID: 311"]
40568#[derive(Debug, Clone, PartialEq)]
40569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
40570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
40571#[cfg_attr(feature = "ts", derive(TS))]
40572#[cfg_attr(feature = "ts", ts(export))]
40573pub struct UAVCAN_NODE_INFO_DATA {
40574    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
40575    pub time_usec: u64,
40576    #[doc = "Time since the start-up of the node."]
40577    pub uptime_sec: u32,
40578    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
40579    pub sw_vcs_commit: u32,
40580    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
40581    #[cfg_attr(feature = "ts", ts(type = "string"))]
40582    pub name: CharArray<80>,
40583    #[doc = "Hardware major version number."]
40584    pub hw_version_major: u8,
40585    #[doc = "Hardware minor version number."]
40586    pub hw_version_minor: u8,
40587    #[doc = "Hardware unique 128-bit ID."]
40588    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
40589    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
40590    pub hw_unique_id: [u8; 16],
40591    #[doc = "Software major version number."]
40592    pub sw_version_major: u8,
40593    #[doc = "Software minor version number."]
40594    pub sw_version_minor: u8,
40595}
40596impl UAVCAN_NODE_INFO_DATA {
40597    pub const ENCODED_LEN: usize = 116usize;
40598    pub const DEFAULT: Self = Self {
40599        time_usec: 0_u64,
40600        uptime_sec: 0_u32,
40601        sw_vcs_commit: 0_u32,
40602        name: CharArray::new([0_u8; 80usize]),
40603        hw_version_major: 0_u8,
40604        hw_version_minor: 0_u8,
40605        hw_unique_id: [0_u8; 16usize],
40606        sw_version_major: 0_u8,
40607        sw_version_minor: 0_u8,
40608    };
40609    #[cfg(feature = "arbitrary")]
40610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
40611        use arbitrary::{Arbitrary, Unstructured};
40612        let mut buf = [0u8; 1024];
40613        rng.fill_bytes(&mut buf);
40614        let mut unstructured = Unstructured::new(&buf);
40615        Self::arbitrary(&mut unstructured).unwrap_or_default()
40616    }
40617}
40618impl Default for UAVCAN_NODE_INFO_DATA {
40619    fn default() -> Self {
40620        Self::DEFAULT.clone()
40621    }
40622}
40623impl MessageData for UAVCAN_NODE_INFO_DATA {
40624    type Message = MavMessage;
40625    const ID: u32 = 311u32;
40626    const NAME: &'static str = "UAVCAN_NODE_INFO";
40627    const EXTRA_CRC: u8 = 95u8;
40628    const ENCODED_LEN: usize = 116usize;
40629    fn deser(
40630        _version: MavlinkVersion,
40631        __input: &[u8],
40632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
40633        let avail_len = __input.len();
40634        let mut payload_buf = [0; Self::ENCODED_LEN];
40635        let mut buf = if avail_len < Self::ENCODED_LEN {
40636            payload_buf[0..avail_len].copy_from_slice(__input);
40637            Bytes::new(&payload_buf)
40638        } else {
40639            Bytes::new(__input)
40640        };
40641        let mut __struct = Self::default();
40642        __struct.time_usec = buf.get_u64_le()?;
40643        __struct.uptime_sec = buf.get_u32_le()?;
40644        __struct.sw_vcs_commit = buf.get_u32_le()?;
40645        let mut tmp = [0_u8; 80usize];
40646        for v in &mut tmp {
40647            *v = buf.get_u8()?;
40648        }
40649        __struct.name = CharArray::new(tmp);
40650        __struct.hw_version_major = buf.get_u8()?;
40651        __struct.hw_version_minor = buf.get_u8()?;
40652        for v in &mut __struct.hw_unique_id {
40653            let val = buf.get_u8()?;
40654            *v = val;
40655        }
40656        __struct.sw_version_major = buf.get_u8()?;
40657        __struct.sw_version_minor = buf.get_u8()?;
40658        Ok(__struct)
40659    }
40660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
40661        let mut __tmp = BytesMut::new(bytes);
40662        #[allow(clippy::absurd_extreme_comparisons)]
40663        #[allow(unused_comparisons)]
40664        if __tmp.remaining() < Self::ENCODED_LEN {
40665            panic!(
40666                "buffer is too small (need {} bytes, but got {})",
40667                Self::ENCODED_LEN,
40668                __tmp.remaining(),
40669            )
40670        }
40671        __tmp.put_u64_le(self.time_usec);
40672        __tmp.put_u32_le(self.uptime_sec);
40673        __tmp.put_u32_le(self.sw_vcs_commit);
40674        for val in &self.name {
40675            __tmp.put_u8(*val);
40676        }
40677        __tmp.put_u8(self.hw_version_major);
40678        __tmp.put_u8(self.hw_version_minor);
40679        for val in &self.hw_unique_id {
40680            __tmp.put_u8(*val);
40681        }
40682        __tmp.put_u8(self.sw_version_major);
40683        __tmp.put_u8(self.sw_version_minor);
40684        if matches!(version, MavlinkVersion::V2) {
40685            let len = __tmp.len();
40686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
40687        } else {
40688            __tmp.len()
40689        }
40690    }
40691}
40692#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
40693#[doc = ""]
40694#[doc = "ID: 310"]
40695#[derive(Debug, Clone, PartialEq)]
40696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
40697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
40698#[cfg_attr(feature = "ts", derive(TS))]
40699#[cfg_attr(feature = "ts", ts(export))]
40700pub struct UAVCAN_NODE_STATUS_DATA {
40701    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
40702    pub time_usec: u64,
40703    #[doc = "Time since the start-up of the node."]
40704    pub uptime_sec: u32,
40705    #[doc = "Vendor-specific status information."]
40706    pub vendor_specific_status_code: u16,
40707    #[doc = "Generalized node health status."]
40708    pub health: UavcanNodeHealth,
40709    #[doc = "Generalized operating mode."]
40710    pub mode: UavcanNodeMode,
40711    #[doc = "Not used currently."]
40712    pub sub_mode: u8,
40713}
40714impl UAVCAN_NODE_STATUS_DATA {
40715    pub const ENCODED_LEN: usize = 17usize;
40716    pub const DEFAULT: Self = Self {
40717        time_usec: 0_u64,
40718        uptime_sec: 0_u32,
40719        vendor_specific_status_code: 0_u16,
40720        health: UavcanNodeHealth::DEFAULT,
40721        mode: UavcanNodeMode::DEFAULT,
40722        sub_mode: 0_u8,
40723    };
40724    #[cfg(feature = "arbitrary")]
40725    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
40726        use arbitrary::{Arbitrary, Unstructured};
40727        let mut buf = [0u8; 1024];
40728        rng.fill_bytes(&mut buf);
40729        let mut unstructured = Unstructured::new(&buf);
40730        Self::arbitrary(&mut unstructured).unwrap_or_default()
40731    }
40732}
40733impl Default for UAVCAN_NODE_STATUS_DATA {
40734    fn default() -> Self {
40735        Self::DEFAULT.clone()
40736    }
40737}
40738impl MessageData for UAVCAN_NODE_STATUS_DATA {
40739    type Message = MavMessage;
40740    const ID: u32 = 310u32;
40741    const NAME: &'static str = "UAVCAN_NODE_STATUS";
40742    const EXTRA_CRC: u8 = 28u8;
40743    const ENCODED_LEN: usize = 17usize;
40744    fn deser(
40745        _version: MavlinkVersion,
40746        __input: &[u8],
40747    ) -> Result<Self, ::mavlink_core::error::ParserError> {
40748        let avail_len = __input.len();
40749        let mut payload_buf = [0; Self::ENCODED_LEN];
40750        let mut buf = if avail_len < Self::ENCODED_LEN {
40751            payload_buf[0..avail_len].copy_from_slice(__input);
40752            Bytes::new(&payload_buf)
40753        } else {
40754            Bytes::new(__input)
40755        };
40756        let mut __struct = Self::default();
40757        __struct.time_usec = buf.get_u64_le()?;
40758        __struct.uptime_sec = buf.get_u32_le()?;
40759        __struct.vendor_specific_status_code = buf.get_u16_le()?;
40760        let tmp = buf.get_u8()?;
40761        __struct.health =
40762            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
40763                enum_type: "UavcanNodeHealth",
40764                value: tmp as u64,
40765            })?;
40766        let tmp = buf.get_u8()?;
40767        __struct.mode =
40768            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
40769                enum_type: "UavcanNodeMode",
40770                value: tmp as u64,
40771            })?;
40772        __struct.sub_mode = buf.get_u8()?;
40773        Ok(__struct)
40774    }
40775    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
40776        let mut __tmp = BytesMut::new(bytes);
40777        #[allow(clippy::absurd_extreme_comparisons)]
40778        #[allow(unused_comparisons)]
40779        if __tmp.remaining() < Self::ENCODED_LEN {
40780            panic!(
40781                "buffer is too small (need {} bytes, but got {})",
40782                Self::ENCODED_LEN,
40783                __tmp.remaining(),
40784            )
40785        }
40786        __tmp.put_u64_le(self.time_usec);
40787        __tmp.put_u32_le(self.uptime_sec);
40788        __tmp.put_u16_le(self.vendor_specific_status_code);
40789        __tmp.put_u8(self.health as u8);
40790        __tmp.put_u8(self.mode as u8);
40791        __tmp.put_u8(self.sub_mode);
40792        if matches!(version, MavlinkVersion::V2) {
40793            let len = __tmp.len();
40794            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
40795        } else {
40796            __tmp.len()
40797        }
40798    }
40799}
40800#[doc = "Request messages."]
40801#[doc = ""]
40802#[doc = "ID: 10006"]
40803#[derive(Debug, Clone, PartialEq)]
40804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
40805#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
40806#[cfg_attr(feature = "ts", derive(TS))]
40807#[cfg_attr(feature = "ts", ts(export))]
40808pub struct UAVIONIX_ADSB_GET_DATA {
40809    #[doc = "Message ID to request. Supports any message in this 10000-10099 range"]
40810    pub ReqMessageId: u32,
40811}
40812impl UAVIONIX_ADSB_GET_DATA {
40813    pub const ENCODED_LEN: usize = 4usize;
40814    pub const DEFAULT: Self = Self {
40815        ReqMessageId: 0_u32,
40816    };
40817    #[cfg(feature = "arbitrary")]
40818    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
40819        use arbitrary::{Arbitrary, Unstructured};
40820        let mut buf = [0u8; 1024];
40821        rng.fill_bytes(&mut buf);
40822        let mut unstructured = Unstructured::new(&buf);
40823        Self::arbitrary(&mut unstructured).unwrap_or_default()
40824    }
40825}
40826impl Default for UAVIONIX_ADSB_GET_DATA {
40827    fn default() -> Self {
40828        Self::DEFAULT.clone()
40829    }
40830}
40831impl MessageData for UAVIONIX_ADSB_GET_DATA {
40832    type Message = MavMessage;
40833    const ID: u32 = 10006u32;
40834    const NAME: &'static str = "UAVIONIX_ADSB_GET";
40835    const EXTRA_CRC: u8 = 193u8;
40836    const ENCODED_LEN: usize = 4usize;
40837    fn deser(
40838        _version: MavlinkVersion,
40839        __input: &[u8],
40840    ) -> Result<Self, ::mavlink_core::error::ParserError> {
40841        let avail_len = __input.len();
40842        let mut payload_buf = [0; Self::ENCODED_LEN];
40843        let mut buf = if avail_len < Self::ENCODED_LEN {
40844            payload_buf[0..avail_len].copy_from_slice(__input);
40845            Bytes::new(&payload_buf)
40846        } else {
40847            Bytes::new(__input)
40848        };
40849        let mut __struct = Self::default();
40850        __struct.ReqMessageId = buf.get_u32_le()?;
40851        Ok(__struct)
40852    }
40853    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
40854        let mut __tmp = BytesMut::new(bytes);
40855        #[allow(clippy::absurd_extreme_comparisons)]
40856        #[allow(unused_comparisons)]
40857        if __tmp.remaining() < Self::ENCODED_LEN {
40858            panic!(
40859                "buffer is too small (need {} bytes, but got {})",
40860                Self::ENCODED_LEN,
40861                __tmp.remaining(),
40862            )
40863        }
40864        __tmp.put_u32_le(self.ReqMessageId);
40865        if matches!(version, MavlinkVersion::V2) {
40866            let len = __tmp.len();
40867            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
40868        } else {
40869            __tmp.len()
40870        }
40871    }
40872}
40873#[doc = "Static data to configure the ADS-B transponder (send within 10 sec of a POR and every 10 sec thereafter)."]
40874#[doc = ""]
40875#[doc = "ID: 10001"]
40876#[derive(Debug, Clone, PartialEq)]
40877#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
40878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
40879#[cfg_attr(feature = "ts", derive(TS))]
40880#[cfg_attr(feature = "ts", ts(export))]
40881pub struct UAVIONIX_ADSB_OUT_CFG_DATA {
40882    #[doc = "Vehicle address (24 bit)"]
40883    pub ICAO: u32,
40884    #[doc = "Aircraft stall speed in cm/s"]
40885    pub stallSpeed: u16,
40886    #[doc = "Vehicle identifier (8 characters, null terminated, valid characters are A-Z, 0-9, \" \" only)"]
40887    #[cfg_attr(feature = "ts", ts(type = "string"))]
40888    pub callsign: CharArray<9>,
40889    #[doc = "Transmitting vehicle type. See ADSB_EMITTER_TYPE enum"]
40890    pub emitterType: AdsbEmitterType,
40891    #[doc = "Aircraft length and width encoding (table 2-35 of DO-282B)"]
40892    pub aircraftSize: UavionixAdsbOutCfgAircraftSize,
40893    #[doc = "GPS antenna lateral offset (table 2-36 of DO-282B)"]
40894    pub gpsOffsetLat: UavionixAdsbOutCfgGpsOffsetLat,
40895    #[doc = "GPS antenna longitudinal offset from nose [if non-zero, take position (in meters) divide by 2 and add one] (table 2-37 DO-282B)"]
40896    pub gpsOffsetLon: UavionixAdsbOutCfgGpsOffsetLon,
40897    #[doc = "ADS-B transponder reciever and transmit enable flags"]
40898    pub rfSelect: UavionixAdsbOutRfSelect,
40899}
40900impl UAVIONIX_ADSB_OUT_CFG_DATA {
40901    pub const ENCODED_LEN: usize = 20usize;
40902    pub const DEFAULT: Self = Self {
40903        ICAO: 0_u32,
40904        stallSpeed: 0_u16,
40905        callsign: CharArray::new([0_u8; 9usize]),
40906        emitterType: AdsbEmitterType::DEFAULT,
40907        aircraftSize: UavionixAdsbOutCfgAircraftSize::DEFAULT,
40908        gpsOffsetLat: UavionixAdsbOutCfgGpsOffsetLat::DEFAULT,
40909        gpsOffsetLon: UavionixAdsbOutCfgGpsOffsetLon::DEFAULT,
40910        rfSelect: UavionixAdsbOutRfSelect::DEFAULT,
40911    };
40912    #[cfg(feature = "arbitrary")]
40913    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
40914        use arbitrary::{Arbitrary, Unstructured};
40915        let mut buf = [0u8; 1024];
40916        rng.fill_bytes(&mut buf);
40917        let mut unstructured = Unstructured::new(&buf);
40918        Self::arbitrary(&mut unstructured).unwrap_or_default()
40919    }
40920}
40921impl Default for UAVIONIX_ADSB_OUT_CFG_DATA {
40922    fn default() -> Self {
40923        Self::DEFAULT.clone()
40924    }
40925}
40926impl MessageData for UAVIONIX_ADSB_OUT_CFG_DATA {
40927    type Message = MavMessage;
40928    const ID: u32 = 10001u32;
40929    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG";
40930    const EXTRA_CRC: u8 = 209u8;
40931    const ENCODED_LEN: usize = 20usize;
40932    fn deser(
40933        _version: MavlinkVersion,
40934        __input: &[u8],
40935    ) -> Result<Self, ::mavlink_core::error::ParserError> {
40936        let avail_len = __input.len();
40937        let mut payload_buf = [0; Self::ENCODED_LEN];
40938        let mut buf = if avail_len < Self::ENCODED_LEN {
40939            payload_buf[0..avail_len].copy_from_slice(__input);
40940            Bytes::new(&payload_buf)
40941        } else {
40942            Bytes::new(__input)
40943        };
40944        let mut __struct = Self::default();
40945        __struct.ICAO = buf.get_u32_le()?;
40946        __struct.stallSpeed = buf.get_u16_le()?;
40947        let mut tmp = [0_u8; 9usize];
40948        for v in &mut tmp {
40949            *v = buf.get_u8()?;
40950        }
40951        __struct.callsign = CharArray::new(tmp);
40952        let tmp = buf.get_u8()?;
40953        __struct.emitterType =
40954            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
40955                enum_type: "AdsbEmitterType",
40956                value: tmp as u64,
40957            })?;
40958        let tmp = buf.get_u8()?;
40959        __struct.aircraftSize =
40960            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
40961                enum_type: "UavionixAdsbOutCfgAircraftSize",
40962                value: tmp as u64,
40963            })?;
40964        let tmp = buf.get_u8()?;
40965        __struct.gpsOffsetLat =
40966            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
40967                enum_type: "UavionixAdsbOutCfgGpsOffsetLat",
40968                value: tmp as u64,
40969            })?;
40970        let tmp = buf.get_u8()?;
40971        __struct.gpsOffsetLon =
40972            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
40973                enum_type: "UavionixAdsbOutCfgGpsOffsetLon",
40974                value: tmp as u64,
40975            })?;
40976        let tmp = buf.get_u8()?;
40977        __struct.rfSelect =
40978            UavionixAdsbOutRfSelect::from_bits(tmp as <UavionixAdsbOutRfSelect as Flags>::Bits)
40979                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
40980                    flag_type: "UavionixAdsbOutRfSelect",
40981                    value: tmp as u64,
40982                })?;
40983        Ok(__struct)
40984    }
40985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
40986        let mut __tmp = BytesMut::new(bytes);
40987        #[allow(clippy::absurd_extreme_comparisons)]
40988        #[allow(unused_comparisons)]
40989        if __tmp.remaining() < Self::ENCODED_LEN {
40990            panic!(
40991                "buffer is too small (need {} bytes, but got {})",
40992                Self::ENCODED_LEN,
40993                __tmp.remaining(),
40994            )
40995        }
40996        __tmp.put_u32_le(self.ICAO);
40997        __tmp.put_u16_le(self.stallSpeed);
40998        for val in &self.callsign {
40999            __tmp.put_u8(*val);
41000        }
41001        __tmp.put_u8(self.emitterType as u8);
41002        __tmp.put_u8(self.aircraftSize as u8);
41003        __tmp.put_u8(self.gpsOffsetLat as u8);
41004        __tmp.put_u8(self.gpsOffsetLon as u8);
41005        __tmp.put_u8(self.rfSelect.bits() as u8);
41006        if matches!(version, MavlinkVersion::V2) {
41007            let len = __tmp.len();
41008            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
41009        } else {
41010            __tmp.len()
41011        }
41012    }
41013}
41014#[doc = "Flight Identification for ADSB-Out vehicles."]
41015#[doc = ""]
41016#[doc = "ID: 10005"]
41017#[derive(Debug, Clone, PartialEq)]
41018#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
41019#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
41020#[cfg_attr(feature = "ts", derive(TS))]
41021#[cfg_attr(feature = "ts", ts(export))]
41022pub struct UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
41023    #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. Reflects Control message setting. This is null-terminated."]
41024    #[cfg_attr(feature = "ts", ts(type = "string"))]
41025    pub flight_id: CharArray<9>,
41026}
41027impl UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
41028    pub const ENCODED_LEN: usize = 9usize;
41029    pub const DEFAULT: Self = Self {
41030        flight_id: CharArray::new([0_u8; 9usize]),
41031    };
41032    #[cfg(feature = "arbitrary")]
41033    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
41034        use arbitrary::{Arbitrary, Unstructured};
41035        let mut buf = [0u8; 1024];
41036        rng.fill_bytes(&mut buf);
41037        let mut unstructured = Unstructured::new(&buf);
41038        Self::arbitrary(&mut unstructured).unwrap_or_default()
41039    }
41040}
41041impl Default for UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
41042    fn default() -> Self {
41043        Self::DEFAULT.clone()
41044    }
41045}
41046impl MessageData for UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
41047    type Message = MavMessage;
41048    const ID: u32 = 10005u32;
41049    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG_FLIGHTID";
41050    const EXTRA_CRC: u8 = 103u8;
41051    const ENCODED_LEN: usize = 9usize;
41052    fn deser(
41053        _version: MavlinkVersion,
41054        __input: &[u8],
41055    ) -> Result<Self, ::mavlink_core::error::ParserError> {
41056        let avail_len = __input.len();
41057        let mut payload_buf = [0; Self::ENCODED_LEN];
41058        let mut buf = if avail_len < Self::ENCODED_LEN {
41059            payload_buf[0..avail_len].copy_from_slice(__input);
41060            Bytes::new(&payload_buf)
41061        } else {
41062            Bytes::new(__input)
41063        };
41064        let mut __struct = Self::default();
41065        let mut tmp = [0_u8; 9usize];
41066        for v in &mut tmp {
41067            *v = buf.get_u8()?;
41068        }
41069        __struct.flight_id = CharArray::new(tmp);
41070        Ok(__struct)
41071    }
41072    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
41073        let mut __tmp = BytesMut::new(bytes);
41074        #[allow(clippy::absurd_extreme_comparisons)]
41075        #[allow(unused_comparisons)]
41076        if __tmp.remaining() < Self::ENCODED_LEN {
41077            panic!(
41078                "buffer is too small (need {} bytes, but got {})",
41079                Self::ENCODED_LEN,
41080                __tmp.remaining(),
41081            )
41082        }
41083        for val in &self.flight_id {
41084            __tmp.put_u8(*val);
41085        }
41086        if matches!(version, MavlinkVersion::V2) {
41087            let len = __tmp.len();
41088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
41089        } else {
41090            __tmp.len()
41091        }
41092    }
41093}
41094#[doc = "Aircraft Registration."]
41095#[doc = ""]
41096#[doc = "ID: 10004"]
41097#[derive(Debug, Clone, PartialEq)]
41098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
41099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
41100#[cfg_attr(feature = "ts", derive(TS))]
41101#[cfg_attr(feature = "ts", ts(export))]
41102pub struct UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
41103    #[doc = "Aircraft Registration (ASCII string A-Z, 0-9 only), e.g. \"N8644B \". Trailing spaces (0x20) only. This is null-terminated."]
41104    #[cfg_attr(feature = "ts", ts(type = "string"))]
41105    pub registration: CharArray<9>,
41106}
41107impl UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
41108    pub const ENCODED_LEN: usize = 9usize;
41109    pub const DEFAULT: Self = Self {
41110        registration: CharArray::new([0_u8; 9usize]),
41111    };
41112    #[cfg(feature = "arbitrary")]
41113    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
41114        use arbitrary::{Arbitrary, Unstructured};
41115        let mut buf = [0u8; 1024];
41116        rng.fill_bytes(&mut buf);
41117        let mut unstructured = Unstructured::new(&buf);
41118        Self::arbitrary(&mut unstructured).unwrap_or_default()
41119    }
41120}
41121impl Default for UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
41122    fn default() -> Self {
41123        Self::DEFAULT.clone()
41124    }
41125}
41126impl MessageData for UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
41127    type Message = MavMessage;
41128    const ID: u32 = 10004u32;
41129    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG_REGISTRATION";
41130    const EXTRA_CRC: u8 = 133u8;
41131    const ENCODED_LEN: usize = 9usize;
41132    fn deser(
41133        _version: MavlinkVersion,
41134        __input: &[u8],
41135    ) -> Result<Self, ::mavlink_core::error::ParserError> {
41136        let avail_len = __input.len();
41137        let mut payload_buf = [0; Self::ENCODED_LEN];
41138        let mut buf = if avail_len < Self::ENCODED_LEN {
41139            payload_buf[0..avail_len].copy_from_slice(__input);
41140            Bytes::new(&payload_buf)
41141        } else {
41142            Bytes::new(__input)
41143        };
41144        let mut __struct = Self::default();
41145        let mut tmp = [0_u8; 9usize];
41146        for v in &mut tmp {
41147            *v = buf.get_u8()?;
41148        }
41149        __struct.registration = CharArray::new(tmp);
41150        Ok(__struct)
41151    }
41152    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
41153        let mut __tmp = BytesMut::new(bytes);
41154        #[allow(clippy::absurd_extreme_comparisons)]
41155        #[allow(unused_comparisons)]
41156        if __tmp.remaining() < Self::ENCODED_LEN {
41157            panic!(
41158                "buffer is too small (need {} bytes, but got {})",
41159                Self::ENCODED_LEN,
41160                __tmp.remaining(),
41161            )
41162        }
41163        for val in &self.registration {
41164            __tmp.put_u8(*val);
41165        }
41166        if matches!(version, MavlinkVersion::V2) {
41167            let len = __tmp.len();
41168            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
41169        } else {
41170            __tmp.len()
41171        }
41172    }
41173}
41174#[doc = "Control message with all data sent in UCP control message."]
41175#[doc = ""]
41176#[doc = "ID: 10007"]
41177#[derive(Debug, Clone, PartialEq)]
41178#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
41179#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
41180#[cfg_attr(feature = "ts", derive(TS))]
41181#[cfg_attr(feature = "ts", ts(export))]
41182pub struct UAVIONIX_ADSB_OUT_CONTROL_DATA {
41183    #[doc = "Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX"]
41184    pub baroAltMSL: i32,
41185    #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
41186    pub squawk: u16,
41187    #[doc = "ADS-B transponder control state flags"]
41188    pub state: UavionixAdsbOutControlState,
41189    #[doc = "Emergency status"]
41190    pub emergencyStatus: UavionixAdsbEmergencyStatus,
41191    #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable."]
41192    #[cfg_attr(feature = "ts", ts(type = "string"))]
41193    pub flight_id: CharArray<8>,
41194    #[doc = "X-Bit enable (military transponders only)"]
41195    pub x_bit: UavionixAdsbXbit,
41196}
41197impl UAVIONIX_ADSB_OUT_CONTROL_DATA {
41198    pub const ENCODED_LEN: usize = 17usize;
41199    pub const DEFAULT: Self = Self {
41200        baroAltMSL: 0_i32,
41201        squawk: 0_u16,
41202        state: UavionixAdsbOutControlState::DEFAULT,
41203        emergencyStatus: UavionixAdsbEmergencyStatus::DEFAULT,
41204        flight_id: CharArray::new([0_u8; 8usize]),
41205        x_bit: UavionixAdsbXbit::DEFAULT,
41206    };
41207    #[cfg(feature = "arbitrary")]
41208    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
41209        use arbitrary::{Arbitrary, Unstructured};
41210        let mut buf = [0u8; 1024];
41211        rng.fill_bytes(&mut buf);
41212        let mut unstructured = Unstructured::new(&buf);
41213        Self::arbitrary(&mut unstructured).unwrap_or_default()
41214    }
41215}
41216impl Default for UAVIONIX_ADSB_OUT_CONTROL_DATA {
41217    fn default() -> Self {
41218        Self::DEFAULT.clone()
41219    }
41220}
41221impl MessageData for UAVIONIX_ADSB_OUT_CONTROL_DATA {
41222    type Message = MavMessage;
41223    const ID: u32 = 10007u32;
41224    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CONTROL";
41225    const EXTRA_CRC: u8 = 71u8;
41226    const ENCODED_LEN: usize = 17usize;
41227    fn deser(
41228        _version: MavlinkVersion,
41229        __input: &[u8],
41230    ) -> Result<Self, ::mavlink_core::error::ParserError> {
41231        let avail_len = __input.len();
41232        let mut payload_buf = [0; Self::ENCODED_LEN];
41233        let mut buf = if avail_len < Self::ENCODED_LEN {
41234            payload_buf[0..avail_len].copy_from_slice(__input);
41235            Bytes::new(&payload_buf)
41236        } else {
41237            Bytes::new(__input)
41238        };
41239        let mut __struct = Self::default();
41240        __struct.baroAltMSL = buf.get_i32_le()?;
41241        __struct.squawk = buf.get_u16_le()?;
41242        let tmp = buf.get_u8()?;
41243        __struct.state = UavionixAdsbOutControlState::from_bits(
41244            tmp as <UavionixAdsbOutControlState as Flags>::Bits,
41245        )
41246        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
41247            flag_type: "UavionixAdsbOutControlState",
41248            value: tmp as u64,
41249        })?;
41250        let tmp = buf.get_u8()?;
41251        __struct.emergencyStatus =
41252            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
41253                enum_type: "UavionixAdsbEmergencyStatus",
41254                value: tmp as u64,
41255            })?;
41256        let mut tmp = [0_u8; 8usize];
41257        for v in &mut tmp {
41258            *v = buf.get_u8()?;
41259        }
41260        __struct.flight_id = CharArray::new(tmp);
41261        let tmp = buf.get_u8()?;
41262        __struct.x_bit = UavionixAdsbXbit::from_bits(tmp as <UavionixAdsbXbit as Flags>::Bits)
41263            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
41264                flag_type: "UavionixAdsbXbit",
41265                value: tmp as u64,
41266            })?;
41267        Ok(__struct)
41268    }
41269    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
41270        let mut __tmp = BytesMut::new(bytes);
41271        #[allow(clippy::absurd_extreme_comparisons)]
41272        #[allow(unused_comparisons)]
41273        if __tmp.remaining() < Self::ENCODED_LEN {
41274            panic!(
41275                "buffer is too small (need {} bytes, but got {})",
41276                Self::ENCODED_LEN,
41277                __tmp.remaining(),
41278            )
41279        }
41280        __tmp.put_i32_le(self.baroAltMSL);
41281        __tmp.put_u16_le(self.squawk);
41282        __tmp.put_u8(self.state.bits() as u8);
41283        __tmp.put_u8(self.emergencyStatus as u8);
41284        for val in &self.flight_id {
41285            __tmp.put_u8(*val);
41286        }
41287        __tmp.put_u8(self.x_bit.bits() as u8);
41288        if matches!(version, MavlinkVersion::V2) {
41289            let len = __tmp.len();
41290            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
41291        } else {
41292            __tmp.len()
41293        }
41294    }
41295}
41296#[doc = "Dynamic data used to generate ADS-B out transponder data (send at 5Hz)."]
41297#[doc = ""]
41298#[doc = "ID: 10002"]
41299#[derive(Debug, Clone, PartialEq)]
41300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
41301#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
41302#[cfg_attr(feature = "ts", derive(TS))]
41303#[cfg_attr(feature = "ts", ts(export))]
41304pub struct UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
41305    #[doc = "UTC time in seconds since GPS epoch (Jan 6, 1980). If unknown set to UINT32_MAX"]
41306    pub utcTime: u32,
41307    #[doc = "Latitude WGS84 (deg * 1E7). If unknown set to INT32_MAX"]
41308    pub gpsLat: i32,
41309    #[doc = "Longitude WGS84 (deg * 1E7). If unknown set to INT32_MAX"]
41310    pub gpsLon: i32,
41311    #[doc = "Altitude (WGS84). UP +ve. If unknown set to INT32_MAX"]
41312    pub gpsAlt: i32,
41313    #[doc = "Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX"]
41314    pub baroAltMSL: i32,
41315    #[doc = "Horizontal accuracy in mm (m * 1E-3). If unknown set to UINT32_MAX"]
41316    pub accuracyHor: u32,
41317    #[doc = "Vertical accuracy in cm. If unknown set to UINT16_MAX"]
41318    pub accuracyVert: u16,
41319    #[doc = "Velocity accuracy in mm/s (m * 1E-3). If unknown set to UINT16_MAX"]
41320    pub accuracyVel: u16,
41321    #[doc = "GPS vertical speed in cm/s. If unknown set to INT16_MAX"]
41322    pub velVert: i16,
41323    #[doc = "North-South velocity over ground in cm/s North +ve. If unknown set to INT16_MAX"]
41324    pub velNS: i16,
41325    #[doc = "East-West velocity over ground in cm/s East +ve. If unknown set to INT16_MAX"]
41326    pub VelEW: i16,
41327    #[doc = "ADS-B transponder dynamic input state flags"]
41328    pub state: UavionixAdsbOutDynamicState,
41329    #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
41330    pub squawk: u16,
41331    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK"]
41332    pub gpsFix: UavionixAdsbOutDynamicGpsFix,
41333    #[doc = "Number of satellites visible. If unknown set to UINT8_MAX"]
41334    pub numSats: u8,
41335    #[doc = "Emergency status"]
41336    pub emergencyStatus: UavionixAdsbEmergencyStatus,
41337}
41338impl UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
41339    pub const ENCODED_LEN: usize = 41usize;
41340    pub const DEFAULT: Self = Self {
41341        utcTime: 0_u32,
41342        gpsLat: 0_i32,
41343        gpsLon: 0_i32,
41344        gpsAlt: 0_i32,
41345        baroAltMSL: 0_i32,
41346        accuracyHor: 0_u32,
41347        accuracyVert: 0_u16,
41348        accuracyVel: 0_u16,
41349        velVert: 0_i16,
41350        velNS: 0_i16,
41351        VelEW: 0_i16,
41352        state: UavionixAdsbOutDynamicState::DEFAULT,
41353        squawk: 0_u16,
41354        gpsFix: UavionixAdsbOutDynamicGpsFix::DEFAULT,
41355        numSats: 0_u8,
41356        emergencyStatus: UavionixAdsbEmergencyStatus::DEFAULT,
41357    };
41358    #[cfg(feature = "arbitrary")]
41359    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
41360        use arbitrary::{Arbitrary, Unstructured};
41361        let mut buf = [0u8; 1024];
41362        rng.fill_bytes(&mut buf);
41363        let mut unstructured = Unstructured::new(&buf);
41364        Self::arbitrary(&mut unstructured).unwrap_or_default()
41365    }
41366}
41367impl Default for UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
41368    fn default() -> Self {
41369        Self::DEFAULT.clone()
41370    }
41371}
41372impl MessageData for UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
41373    type Message = MavMessage;
41374    const ID: u32 = 10002u32;
41375    const NAME: &'static str = "UAVIONIX_ADSB_OUT_DYNAMIC";
41376    const EXTRA_CRC: u8 = 186u8;
41377    const ENCODED_LEN: usize = 41usize;
41378    fn deser(
41379        _version: MavlinkVersion,
41380        __input: &[u8],
41381    ) -> Result<Self, ::mavlink_core::error::ParserError> {
41382        let avail_len = __input.len();
41383        let mut payload_buf = [0; Self::ENCODED_LEN];
41384        let mut buf = if avail_len < Self::ENCODED_LEN {
41385            payload_buf[0..avail_len].copy_from_slice(__input);
41386            Bytes::new(&payload_buf)
41387        } else {
41388            Bytes::new(__input)
41389        };
41390        let mut __struct = Self::default();
41391        __struct.utcTime = buf.get_u32_le()?;
41392        __struct.gpsLat = buf.get_i32_le()?;
41393        __struct.gpsLon = buf.get_i32_le()?;
41394        __struct.gpsAlt = buf.get_i32_le()?;
41395        __struct.baroAltMSL = buf.get_i32_le()?;
41396        __struct.accuracyHor = buf.get_u32_le()?;
41397        __struct.accuracyVert = buf.get_u16_le()?;
41398        __struct.accuracyVel = buf.get_u16_le()?;
41399        __struct.velVert = buf.get_i16_le()?;
41400        __struct.velNS = buf.get_i16_le()?;
41401        __struct.VelEW = buf.get_i16_le()?;
41402        let tmp = buf.get_u16_le()?;
41403        __struct.state = UavionixAdsbOutDynamicState::from_bits(
41404            tmp as <UavionixAdsbOutDynamicState as Flags>::Bits,
41405        )
41406        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
41407            flag_type: "UavionixAdsbOutDynamicState",
41408            value: tmp as u64,
41409        })?;
41410        __struct.squawk = buf.get_u16_le()?;
41411        let tmp = buf.get_u8()?;
41412        __struct.gpsFix =
41413            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
41414                enum_type: "UavionixAdsbOutDynamicGpsFix",
41415                value: tmp as u64,
41416            })?;
41417        __struct.numSats = buf.get_u8()?;
41418        let tmp = buf.get_u8()?;
41419        __struct.emergencyStatus =
41420            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
41421                enum_type: "UavionixAdsbEmergencyStatus",
41422                value: tmp as u64,
41423            })?;
41424        Ok(__struct)
41425    }
41426    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
41427        let mut __tmp = BytesMut::new(bytes);
41428        #[allow(clippy::absurd_extreme_comparisons)]
41429        #[allow(unused_comparisons)]
41430        if __tmp.remaining() < Self::ENCODED_LEN {
41431            panic!(
41432                "buffer is too small (need {} bytes, but got {})",
41433                Self::ENCODED_LEN,
41434                __tmp.remaining(),
41435            )
41436        }
41437        __tmp.put_u32_le(self.utcTime);
41438        __tmp.put_i32_le(self.gpsLat);
41439        __tmp.put_i32_le(self.gpsLon);
41440        __tmp.put_i32_le(self.gpsAlt);
41441        __tmp.put_i32_le(self.baroAltMSL);
41442        __tmp.put_u32_le(self.accuracyHor);
41443        __tmp.put_u16_le(self.accuracyVert);
41444        __tmp.put_u16_le(self.accuracyVel);
41445        __tmp.put_i16_le(self.velVert);
41446        __tmp.put_i16_le(self.velNS);
41447        __tmp.put_i16_le(self.VelEW);
41448        __tmp.put_u16_le(self.state.bits() as u16);
41449        __tmp.put_u16_le(self.squawk);
41450        __tmp.put_u8(self.gpsFix as u8);
41451        __tmp.put_u8(self.numSats);
41452        __tmp.put_u8(self.emergencyStatus as u8);
41453        if matches!(version, MavlinkVersion::V2) {
41454            let len = __tmp.len();
41455            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
41456        } else {
41457            __tmp.len()
41458        }
41459    }
41460}
41461#[doc = "Status message with information from UCP Heartbeat and Status messages."]
41462#[doc = ""]
41463#[doc = "ID: 10008"]
41464#[derive(Debug, Clone, PartialEq)]
41465#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
41466#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
41467#[cfg_attr(feature = "ts", derive(TS))]
41468#[cfg_attr(feature = "ts", ts(export))]
41469pub struct UAVIONIX_ADSB_OUT_STATUS_DATA {
41470    #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
41471    pub squawk: u16,
41472    #[doc = "ADS-B transponder status state flags"]
41473    pub state: UavionixAdsbOutStatusState,
41474    #[doc = "Integrity and Accuracy of traffic reported as a 4-bit value for each field (NACp 7:4, NIC 3:0) and encoded by Containment Radius (HPL) and Estimated Position Uncertainty (HFOM), respectively"]
41475    pub NIC_NACp: UavionixAdsbOutStatusNicNacp,
41476    #[doc = "Board temperature in C"]
41477    pub boardTemp: u8,
41478    #[doc = "ADS-B transponder fault flags"]
41479    pub fault: UavionixAdsbOutStatusFault,
41480    #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable."]
41481    #[cfg_attr(feature = "ts", ts(type = "string"))]
41482    pub flight_id: CharArray<8>,
41483}
41484impl UAVIONIX_ADSB_OUT_STATUS_DATA {
41485    pub const ENCODED_LEN: usize = 14usize;
41486    pub const DEFAULT: Self = Self {
41487        squawk: 0_u16,
41488        state: UavionixAdsbOutStatusState::DEFAULT,
41489        NIC_NACp: UavionixAdsbOutStatusNicNacp::DEFAULT,
41490        boardTemp: 0_u8,
41491        fault: UavionixAdsbOutStatusFault::DEFAULT,
41492        flight_id: CharArray::new([0_u8; 8usize]),
41493    };
41494    #[cfg(feature = "arbitrary")]
41495    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
41496        use arbitrary::{Arbitrary, Unstructured};
41497        let mut buf = [0u8; 1024];
41498        rng.fill_bytes(&mut buf);
41499        let mut unstructured = Unstructured::new(&buf);
41500        Self::arbitrary(&mut unstructured).unwrap_or_default()
41501    }
41502}
41503impl Default for UAVIONIX_ADSB_OUT_STATUS_DATA {
41504    fn default() -> Self {
41505        Self::DEFAULT.clone()
41506    }
41507}
41508impl MessageData for UAVIONIX_ADSB_OUT_STATUS_DATA {
41509    type Message = MavMessage;
41510    const ID: u32 = 10008u32;
41511    const NAME: &'static str = "UAVIONIX_ADSB_OUT_STATUS";
41512    const EXTRA_CRC: u8 = 240u8;
41513    const ENCODED_LEN: usize = 14usize;
41514    fn deser(
41515        _version: MavlinkVersion,
41516        __input: &[u8],
41517    ) -> Result<Self, ::mavlink_core::error::ParserError> {
41518        let avail_len = __input.len();
41519        let mut payload_buf = [0; Self::ENCODED_LEN];
41520        let mut buf = if avail_len < Self::ENCODED_LEN {
41521            payload_buf[0..avail_len].copy_from_slice(__input);
41522            Bytes::new(&payload_buf)
41523        } else {
41524            Bytes::new(__input)
41525        };
41526        let mut __struct = Self::default();
41527        __struct.squawk = buf.get_u16_le()?;
41528        let tmp = buf.get_u8()?;
41529        __struct.state = UavionixAdsbOutStatusState::from_bits(
41530            tmp as <UavionixAdsbOutStatusState as Flags>::Bits,
41531        )
41532        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
41533            flag_type: "UavionixAdsbOutStatusState",
41534            value: tmp as u64,
41535        })?;
41536        let tmp = buf.get_u8()?;
41537        __struct.NIC_NACp =
41538            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
41539                enum_type: "UavionixAdsbOutStatusNicNacp",
41540                value: tmp as u64,
41541            })?;
41542        __struct.boardTemp = buf.get_u8()?;
41543        let tmp = buf.get_u8()?;
41544        __struct.fault = UavionixAdsbOutStatusFault::from_bits(
41545            tmp as <UavionixAdsbOutStatusFault as Flags>::Bits,
41546        )
41547        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
41548            flag_type: "UavionixAdsbOutStatusFault",
41549            value: tmp as u64,
41550        })?;
41551        let mut tmp = [0_u8; 8usize];
41552        for v in &mut tmp {
41553            *v = buf.get_u8()?;
41554        }
41555        __struct.flight_id = CharArray::new(tmp);
41556        Ok(__struct)
41557    }
41558    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
41559        let mut __tmp = BytesMut::new(bytes);
41560        #[allow(clippy::absurd_extreme_comparisons)]
41561        #[allow(unused_comparisons)]
41562        if __tmp.remaining() < Self::ENCODED_LEN {
41563            panic!(
41564                "buffer is too small (need {} bytes, but got {})",
41565                Self::ENCODED_LEN,
41566                __tmp.remaining(),
41567            )
41568        }
41569        __tmp.put_u16_le(self.squawk);
41570        __tmp.put_u8(self.state.bits() as u8);
41571        __tmp.put_u8(self.NIC_NACp as u8);
41572        __tmp.put_u8(self.boardTemp);
41573        __tmp.put_u8(self.fault.bits() as u8);
41574        for val in &self.flight_id {
41575            __tmp.put_u8(*val);
41576        }
41577        if matches!(version, MavlinkVersion::V2) {
41578            let len = __tmp.len();
41579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
41580        } else {
41581            __tmp.len()
41582        }
41583    }
41584}
41585#[doc = "Transceiver heartbeat with health report (updated every 10s)."]
41586#[doc = ""]
41587#[doc = "ID: 10003"]
41588#[derive(Debug, Clone, PartialEq)]
41589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
41590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
41591#[cfg_attr(feature = "ts", derive(TS))]
41592#[cfg_attr(feature = "ts", ts(export))]
41593pub struct UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
41594    #[doc = "ADS-B transponder messages"]
41595    pub rfHealth: UavionixAdsbRfHealth,
41596}
41597impl UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
41598    pub const ENCODED_LEN: usize = 1usize;
41599    pub const DEFAULT: Self = Self {
41600        rfHealth: UavionixAdsbRfHealth::DEFAULT,
41601    };
41602    #[cfg(feature = "arbitrary")]
41603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
41604        use arbitrary::{Arbitrary, Unstructured};
41605        let mut buf = [0u8; 1024];
41606        rng.fill_bytes(&mut buf);
41607        let mut unstructured = Unstructured::new(&buf);
41608        Self::arbitrary(&mut unstructured).unwrap_or_default()
41609    }
41610}
41611impl Default for UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
41612    fn default() -> Self {
41613        Self::DEFAULT.clone()
41614    }
41615}
41616impl MessageData for UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
41617    type Message = MavMessage;
41618    const ID: u32 = 10003u32;
41619    const NAME: &'static str = "UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT";
41620    const EXTRA_CRC: u8 = 4u8;
41621    const ENCODED_LEN: usize = 1usize;
41622    fn deser(
41623        _version: MavlinkVersion,
41624        __input: &[u8],
41625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
41626        let avail_len = __input.len();
41627        let mut payload_buf = [0; Self::ENCODED_LEN];
41628        let mut buf = if avail_len < Self::ENCODED_LEN {
41629            payload_buf[0..avail_len].copy_from_slice(__input);
41630            Bytes::new(&payload_buf)
41631        } else {
41632            Bytes::new(__input)
41633        };
41634        let mut __struct = Self::default();
41635        let tmp = buf.get_u8()?;
41636        __struct.rfHealth = UavionixAdsbRfHealth::from_bits(
41637            tmp as <UavionixAdsbRfHealth as Flags>::Bits,
41638        )
41639        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
41640            flag_type: "UavionixAdsbRfHealth",
41641            value: tmp as u64,
41642        })?;
41643        Ok(__struct)
41644    }
41645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
41646        let mut __tmp = BytesMut::new(bytes);
41647        #[allow(clippy::absurd_extreme_comparisons)]
41648        #[allow(unused_comparisons)]
41649        if __tmp.remaining() < Self::ENCODED_LEN {
41650            panic!(
41651                "buffer is too small (need {} bytes, but got {})",
41652                Self::ENCODED_LEN,
41653                __tmp.remaining(),
41654            )
41655        }
41656        __tmp.put_u8(self.rfHealth.bits() as u8);
41657        if matches!(version, MavlinkVersion::V2) {
41658            let len = __tmp.len();
41659            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
41660        } else {
41661            __tmp.len()
41662        }
41663    }
41664}
41665#[doc = "The global position resulting from GPS and sensor fusion."]
41666#[doc = ""]
41667#[doc = "ID: 340"]
41668#[derive(Debug, Clone, PartialEq)]
41669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
41670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
41671#[cfg_attr(feature = "ts", derive(TS))]
41672#[cfg_attr(feature = "ts", ts(export))]
41673pub struct UTM_GLOBAL_POSITION_DATA {
41674    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
41675    pub time: u64,
41676    #[doc = "Latitude (WGS84)"]
41677    pub lat: i32,
41678    #[doc = "Longitude (WGS84)"]
41679    pub lon: i32,
41680    #[doc = "Altitude (WGS84)"]
41681    pub alt: i32,
41682    #[doc = "Altitude above ground"]
41683    pub relative_alt: i32,
41684    #[doc = "Next waypoint, latitude (WGS84)"]
41685    pub next_lat: i32,
41686    #[doc = "Next waypoint, longitude (WGS84)"]
41687    pub next_lon: i32,
41688    #[doc = "Next waypoint, altitude (WGS84)"]
41689    pub next_alt: i32,
41690    #[doc = "Ground X speed (latitude, positive north)"]
41691    pub vx: i16,
41692    #[doc = "Ground Y speed (longitude, positive east)"]
41693    pub vy: i16,
41694    #[doc = "Ground Z speed (altitude, positive down)"]
41695    pub vz: i16,
41696    #[doc = "Horizontal position uncertainty (standard deviation)"]
41697    pub h_acc: u16,
41698    #[doc = "Altitude uncertainty (standard deviation)"]
41699    pub v_acc: u16,
41700    #[doc = "Speed uncertainty (standard deviation)"]
41701    pub vel_acc: u16,
41702    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
41703    pub update_rate: u16,
41704    #[doc = "Unique UAS ID."]
41705    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
41706    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
41707    pub uas_id: [u8; 18],
41708    #[doc = "Flight state"]
41709    pub flight_state: UtmFlightState,
41710    #[doc = "Bitwise OR combination of the data available flags."]
41711    pub flags: UtmDataAvailFlags,
41712}
41713impl UTM_GLOBAL_POSITION_DATA {
41714    pub const ENCODED_LEN: usize = 70usize;
41715    pub const DEFAULT: Self = Self {
41716        time: 0_u64,
41717        lat: 0_i32,
41718        lon: 0_i32,
41719        alt: 0_i32,
41720        relative_alt: 0_i32,
41721        next_lat: 0_i32,
41722        next_lon: 0_i32,
41723        next_alt: 0_i32,
41724        vx: 0_i16,
41725        vy: 0_i16,
41726        vz: 0_i16,
41727        h_acc: 0_u16,
41728        v_acc: 0_u16,
41729        vel_acc: 0_u16,
41730        update_rate: 0_u16,
41731        uas_id: [0_u8; 18usize],
41732        flight_state: UtmFlightState::DEFAULT,
41733        flags: UtmDataAvailFlags::DEFAULT,
41734    };
41735    #[cfg(feature = "arbitrary")]
41736    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
41737        use arbitrary::{Arbitrary, Unstructured};
41738        let mut buf = [0u8; 1024];
41739        rng.fill_bytes(&mut buf);
41740        let mut unstructured = Unstructured::new(&buf);
41741        Self::arbitrary(&mut unstructured).unwrap_or_default()
41742    }
41743}
41744impl Default for UTM_GLOBAL_POSITION_DATA {
41745    fn default() -> Self {
41746        Self::DEFAULT.clone()
41747    }
41748}
41749impl MessageData for UTM_GLOBAL_POSITION_DATA {
41750    type Message = MavMessage;
41751    const ID: u32 = 340u32;
41752    const NAME: &'static str = "UTM_GLOBAL_POSITION";
41753    const EXTRA_CRC: u8 = 99u8;
41754    const ENCODED_LEN: usize = 70usize;
41755    fn deser(
41756        _version: MavlinkVersion,
41757        __input: &[u8],
41758    ) -> Result<Self, ::mavlink_core::error::ParserError> {
41759        let avail_len = __input.len();
41760        let mut payload_buf = [0; Self::ENCODED_LEN];
41761        let mut buf = if avail_len < Self::ENCODED_LEN {
41762            payload_buf[0..avail_len].copy_from_slice(__input);
41763            Bytes::new(&payload_buf)
41764        } else {
41765            Bytes::new(__input)
41766        };
41767        let mut __struct = Self::default();
41768        __struct.time = buf.get_u64_le()?;
41769        __struct.lat = buf.get_i32_le()?;
41770        __struct.lon = buf.get_i32_le()?;
41771        __struct.alt = buf.get_i32_le()?;
41772        __struct.relative_alt = buf.get_i32_le()?;
41773        __struct.next_lat = buf.get_i32_le()?;
41774        __struct.next_lon = buf.get_i32_le()?;
41775        __struct.next_alt = buf.get_i32_le()?;
41776        __struct.vx = buf.get_i16_le()?;
41777        __struct.vy = buf.get_i16_le()?;
41778        __struct.vz = buf.get_i16_le()?;
41779        __struct.h_acc = buf.get_u16_le()?;
41780        __struct.v_acc = buf.get_u16_le()?;
41781        __struct.vel_acc = buf.get_u16_le()?;
41782        __struct.update_rate = buf.get_u16_le()?;
41783        for v in &mut __struct.uas_id {
41784            let val = buf.get_u8()?;
41785            *v = val;
41786        }
41787        let tmp = buf.get_u8()?;
41788        __struct.flight_state =
41789            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
41790                enum_type: "UtmFlightState",
41791                value: tmp as u64,
41792            })?;
41793        let tmp = buf.get_u8()?;
41794        __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
41795            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
41796                flag_type: "UtmDataAvailFlags",
41797                value: tmp as u64,
41798            })?;
41799        Ok(__struct)
41800    }
41801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
41802        let mut __tmp = BytesMut::new(bytes);
41803        #[allow(clippy::absurd_extreme_comparisons)]
41804        #[allow(unused_comparisons)]
41805        if __tmp.remaining() < Self::ENCODED_LEN {
41806            panic!(
41807                "buffer is too small (need {} bytes, but got {})",
41808                Self::ENCODED_LEN,
41809                __tmp.remaining(),
41810            )
41811        }
41812        __tmp.put_u64_le(self.time);
41813        __tmp.put_i32_le(self.lat);
41814        __tmp.put_i32_le(self.lon);
41815        __tmp.put_i32_le(self.alt);
41816        __tmp.put_i32_le(self.relative_alt);
41817        __tmp.put_i32_le(self.next_lat);
41818        __tmp.put_i32_le(self.next_lon);
41819        __tmp.put_i32_le(self.next_alt);
41820        __tmp.put_i16_le(self.vx);
41821        __tmp.put_i16_le(self.vy);
41822        __tmp.put_i16_le(self.vz);
41823        __tmp.put_u16_le(self.h_acc);
41824        __tmp.put_u16_le(self.v_acc);
41825        __tmp.put_u16_le(self.vel_acc);
41826        __tmp.put_u16_le(self.update_rate);
41827        for val in &self.uas_id {
41828            __tmp.put_u8(*val);
41829        }
41830        __tmp.put_u8(self.flight_state as u8);
41831        __tmp.put_u8(self.flags.bits() as u8);
41832        if matches!(version, MavlinkVersion::V2) {
41833            let len = __tmp.len();
41834            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
41835        } else {
41836            __tmp.len()
41837        }
41838    }
41839}
41840#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
41841#[doc = ""]
41842#[doc = "ID: 248"]
41843#[derive(Debug, Clone, PartialEq)]
41844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
41845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
41846#[cfg_attr(feature = "ts", derive(TS))]
41847#[cfg_attr(feature = "ts", ts(export))]
41848pub struct V2_EXTENSION_DATA {
41849    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
41850    pub message_type: u16,
41851    #[doc = "Network ID (0 for broadcast)"]
41852    pub target_network: u8,
41853    #[doc = "System ID (0 for broadcast)"]
41854    pub target_system: u8,
41855    #[doc = "Component ID (0 for broadcast)"]
41856    pub target_component: u8,
41857    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
41858    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
41859    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
41860    pub payload: [u8; 249],
41861}
41862impl V2_EXTENSION_DATA {
41863    pub const ENCODED_LEN: usize = 254usize;
41864    pub const DEFAULT: Self = Self {
41865        message_type: 0_u16,
41866        target_network: 0_u8,
41867        target_system: 0_u8,
41868        target_component: 0_u8,
41869        payload: [0_u8; 249usize],
41870    };
41871    #[cfg(feature = "arbitrary")]
41872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
41873        use arbitrary::{Arbitrary, Unstructured};
41874        let mut buf = [0u8; 1024];
41875        rng.fill_bytes(&mut buf);
41876        let mut unstructured = Unstructured::new(&buf);
41877        Self::arbitrary(&mut unstructured).unwrap_or_default()
41878    }
41879}
41880impl Default for V2_EXTENSION_DATA {
41881    fn default() -> Self {
41882        Self::DEFAULT.clone()
41883    }
41884}
41885impl MessageData for V2_EXTENSION_DATA {
41886    type Message = MavMessage;
41887    const ID: u32 = 248u32;
41888    const NAME: &'static str = "V2_EXTENSION";
41889    const EXTRA_CRC: u8 = 8u8;
41890    const ENCODED_LEN: usize = 254usize;
41891    fn deser(
41892        _version: MavlinkVersion,
41893        __input: &[u8],
41894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
41895        let avail_len = __input.len();
41896        let mut payload_buf = [0; Self::ENCODED_LEN];
41897        let mut buf = if avail_len < Self::ENCODED_LEN {
41898            payload_buf[0..avail_len].copy_from_slice(__input);
41899            Bytes::new(&payload_buf)
41900        } else {
41901            Bytes::new(__input)
41902        };
41903        let mut __struct = Self::default();
41904        __struct.message_type = buf.get_u16_le()?;
41905        __struct.target_network = buf.get_u8()?;
41906        __struct.target_system = buf.get_u8()?;
41907        __struct.target_component = buf.get_u8()?;
41908        for v in &mut __struct.payload {
41909            let val = buf.get_u8()?;
41910            *v = val;
41911        }
41912        Ok(__struct)
41913    }
41914    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
41915        let mut __tmp = BytesMut::new(bytes);
41916        #[allow(clippy::absurd_extreme_comparisons)]
41917        #[allow(unused_comparisons)]
41918        if __tmp.remaining() < Self::ENCODED_LEN {
41919            panic!(
41920                "buffer is too small (need {} bytes, but got {})",
41921                Self::ENCODED_LEN,
41922                __tmp.remaining(),
41923            )
41924        }
41925        __tmp.put_u16_le(self.message_type);
41926        __tmp.put_u8(self.target_network);
41927        __tmp.put_u8(self.target_system);
41928        __tmp.put_u8(self.target_component);
41929        for val in &self.payload {
41930            __tmp.put_u8(*val);
41931        }
41932        if matches!(version, MavlinkVersion::V2) {
41933            let len = __tmp.len();
41934            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
41935        } else {
41936            __tmp.len()
41937        }
41938    }
41939}
41940#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
41941#[doc = ""]
41942#[doc = "ID: 74"]
41943#[derive(Debug, Clone, PartialEq)]
41944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
41945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
41946#[cfg_attr(feature = "ts", derive(TS))]
41947#[cfg_attr(feature = "ts", ts(export))]
41948pub struct VFR_HUD_DATA {
41949    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
41950    pub airspeed: f32,
41951    #[doc = "Current ground speed."]
41952    pub groundspeed: f32,
41953    #[doc = "Current altitude (MSL)."]
41954    pub alt: f32,
41955    #[doc = "Current climb rate."]
41956    pub climb: f32,
41957    #[doc = "Current heading in compass units (0-360, 0=north)."]
41958    pub heading: i16,
41959    #[doc = "Current throttle setting (0 to 100)."]
41960    pub throttle: u16,
41961}
41962impl VFR_HUD_DATA {
41963    pub const ENCODED_LEN: usize = 20usize;
41964    pub const DEFAULT: Self = Self {
41965        airspeed: 0.0_f32,
41966        groundspeed: 0.0_f32,
41967        alt: 0.0_f32,
41968        climb: 0.0_f32,
41969        heading: 0_i16,
41970        throttle: 0_u16,
41971    };
41972    #[cfg(feature = "arbitrary")]
41973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
41974        use arbitrary::{Arbitrary, Unstructured};
41975        let mut buf = [0u8; 1024];
41976        rng.fill_bytes(&mut buf);
41977        let mut unstructured = Unstructured::new(&buf);
41978        Self::arbitrary(&mut unstructured).unwrap_or_default()
41979    }
41980}
41981impl Default for VFR_HUD_DATA {
41982    fn default() -> Self {
41983        Self::DEFAULT.clone()
41984    }
41985}
41986impl MessageData for VFR_HUD_DATA {
41987    type Message = MavMessage;
41988    const ID: u32 = 74u32;
41989    const NAME: &'static str = "VFR_HUD";
41990    const EXTRA_CRC: u8 = 20u8;
41991    const ENCODED_LEN: usize = 20usize;
41992    fn deser(
41993        _version: MavlinkVersion,
41994        __input: &[u8],
41995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
41996        let avail_len = __input.len();
41997        let mut payload_buf = [0; Self::ENCODED_LEN];
41998        let mut buf = if avail_len < Self::ENCODED_LEN {
41999            payload_buf[0..avail_len].copy_from_slice(__input);
42000            Bytes::new(&payload_buf)
42001        } else {
42002            Bytes::new(__input)
42003        };
42004        let mut __struct = Self::default();
42005        __struct.airspeed = buf.get_f32_le()?;
42006        __struct.groundspeed = buf.get_f32_le()?;
42007        __struct.alt = buf.get_f32_le()?;
42008        __struct.climb = buf.get_f32_le()?;
42009        __struct.heading = buf.get_i16_le()?;
42010        __struct.throttle = buf.get_u16_le()?;
42011        Ok(__struct)
42012    }
42013    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
42014        let mut __tmp = BytesMut::new(bytes);
42015        #[allow(clippy::absurd_extreme_comparisons)]
42016        #[allow(unused_comparisons)]
42017        if __tmp.remaining() < Self::ENCODED_LEN {
42018            panic!(
42019                "buffer is too small (need {} bytes, but got {})",
42020                Self::ENCODED_LEN,
42021                __tmp.remaining(),
42022            )
42023        }
42024        __tmp.put_f32_le(self.airspeed);
42025        __tmp.put_f32_le(self.groundspeed);
42026        __tmp.put_f32_le(self.alt);
42027        __tmp.put_f32_le(self.climb);
42028        __tmp.put_i16_le(self.heading);
42029        __tmp.put_u16_le(self.throttle);
42030        if matches!(version, MavlinkVersion::V2) {
42031            let len = __tmp.len();
42032            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
42033        } else {
42034            __tmp.len()
42035        }
42036    }
42037}
42038#[doc = "Vibration levels and accelerometer clipping."]
42039#[doc = ""]
42040#[doc = "ID: 241"]
42041#[derive(Debug, Clone, PartialEq)]
42042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
42043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
42044#[cfg_attr(feature = "ts", derive(TS))]
42045#[cfg_attr(feature = "ts", ts(export))]
42046pub struct VIBRATION_DATA {
42047    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
42048    pub time_usec: u64,
42049    #[doc = "Vibration levels on X-axis"]
42050    pub vibration_x: f32,
42051    #[doc = "Vibration levels on Y-axis"]
42052    pub vibration_y: f32,
42053    #[doc = "Vibration levels on Z-axis"]
42054    pub vibration_z: f32,
42055    #[doc = "first accelerometer clipping count"]
42056    pub clipping_0: u32,
42057    #[doc = "second accelerometer clipping count"]
42058    pub clipping_1: u32,
42059    #[doc = "third accelerometer clipping count"]
42060    pub clipping_2: u32,
42061}
42062impl VIBRATION_DATA {
42063    pub const ENCODED_LEN: usize = 32usize;
42064    pub const DEFAULT: Self = Self {
42065        time_usec: 0_u64,
42066        vibration_x: 0.0_f32,
42067        vibration_y: 0.0_f32,
42068        vibration_z: 0.0_f32,
42069        clipping_0: 0_u32,
42070        clipping_1: 0_u32,
42071        clipping_2: 0_u32,
42072    };
42073    #[cfg(feature = "arbitrary")]
42074    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
42075        use arbitrary::{Arbitrary, Unstructured};
42076        let mut buf = [0u8; 1024];
42077        rng.fill_bytes(&mut buf);
42078        let mut unstructured = Unstructured::new(&buf);
42079        Self::arbitrary(&mut unstructured).unwrap_or_default()
42080    }
42081}
42082impl Default for VIBRATION_DATA {
42083    fn default() -> Self {
42084        Self::DEFAULT.clone()
42085    }
42086}
42087impl MessageData for VIBRATION_DATA {
42088    type Message = MavMessage;
42089    const ID: u32 = 241u32;
42090    const NAME: &'static str = "VIBRATION";
42091    const EXTRA_CRC: u8 = 90u8;
42092    const ENCODED_LEN: usize = 32usize;
42093    fn deser(
42094        _version: MavlinkVersion,
42095        __input: &[u8],
42096    ) -> Result<Self, ::mavlink_core::error::ParserError> {
42097        let avail_len = __input.len();
42098        let mut payload_buf = [0; Self::ENCODED_LEN];
42099        let mut buf = if avail_len < Self::ENCODED_LEN {
42100            payload_buf[0..avail_len].copy_from_slice(__input);
42101            Bytes::new(&payload_buf)
42102        } else {
42103            Bytes::new(__input)
42104        };
42105        let mut __struct = Self::default();
42106        __struct.time_usec = buf.get_u64_le()?;
42107        __struct.vibration_x = buf.get_f32_le()?;
42108        __struct.vibration_y = buf.get_f32_le()?;
42109        __struct.vibration_z = buf.get_f32_le()?;
42110        __struct.clipping_0 = buf.get_u32_le()?;
42111        __struct.clipping_1 = buf.get_u32_le()?;
42112        __struct.clipping_2 = buf.get_u32_le()?;
42113        Ok(__struct)
42114    }
42115    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
42116        let mut __tmp = BytesMut::new(bytes);
42117        #[allow(clippy::absurd_extreme_comparisons)]
42118        #[allow(unused_comparisons)]
42119        if __tmp.remaining() < Self::ENCODED_LEN {
42120            panic!(
42121                "buffer is too small (need {} bytes, but got {})",
42122                Self::ENCODED_LEN,
42123                __tmp.remaining(),
42124            )
42125        }
42126        __tmp.put_u64_le(self.time_usec);
42127        __tmp.put_f32_le(self.vibration_x);
42128        __tmp.put_f32_le(self.vibration_y);
42129        __tmp.put_f32_le(self.vibration_z);
42130        __tmp.put_u32_le(self.clipping_0);
42131        __tmp.put_u32_le(self.clipping_1);
42132        __tmp.put_u32_le(self.clipping_2);
42133        if matches!(version, MavlinkVersion::V2) {
42134            let len = __tmp.len();
42135            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
42136        } else {
42137            __tmp.len()
42138        }
42139    }
42140}
42141#[doc = "Global position estimate from a Vicon motion system source."]
42142#[doc = ""]
42143#[doc = "ID: 104"]
42144#[derive(Debug, Clone, PartialEq)]
42145#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
42146#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
42147#[cfg_attr(feature = "ts", derive(TS))]
42148#[cfg_attr(feature = "ts", ts(export))]
42149pub struct VICON_POSITION_ESTIMATE_DATA {
42150    #[doc = "Timestamp (UNIX time or time since system boot)"]
42151    pub usec: u64,
42152    #[doc = "Global X position"]
42153    pub x: f32,
42154    #[doc = "Global Y position"]
42155    pub y: f32,
42156    #[doc = "Global Z position"]
42157    pub z: f32,
42158    #[doc = "Roll angle"]
42159    pub roll: f32,
42160    #[doc = "Pitch angle"]
42161    pub pitch: f32,
42162    #[doc = "Yaw angle"]
42163    pub yaw: f32,
42164    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
42165    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
42166    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
42167    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
42168    pub covariance: [f32; 21],
42169}
42170impl VICON_POSITION_ESTIMATE_DATA {
42171    pub const ENCODED_LEN: usize = 116usize;
42172    pub const DEFAULT: Self = Self {
42173        usec: 0_u64,
42174        x: 0.0_f32,
42175        y: 0.0_f32,
42176        z: 0.0_f32,
42177        roll: 0.0_f32,
42178        pitch: 0.0_f32,
42179        yaw: 0.0_f32,
42180        covariance: [0.0_f32; 21usize],
42181    };
42182    #[cfg(feature = "arbitrary")]
42183    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
42184        use arbitrary::{Arbitrary, Unstructured};
42185        let mut buf = [0u8; 1024];
42186        rng.fill_bytes(&mut buf);
42187        let mut unstructured = Unstructured::new(&buf);
42188        Self::arbitrary(&mut unstructured).unwrap_or_default()
42189    }
42190}
42191impl Default for VICON_POSITION_ESTIMATE_DATA {
42192    fn default() -> Self {
42193        Self::DEFAULT.clone()
42194    }
42195}
42196impl MessageData for VICON_POSITION_ESTIMATE_DATA {
42197    type Message = MavMessage;
42198    const ID: u32 = 104u32;
42199    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
42200    const EXTRA_CRC: u8 = 56u8;
42201    const ENCODED_LEN: usize = 116usize;
42202    fn deser(
42203        _version: MavlinkVersion,
42204        __input: &[u8],
42205    ) -> Result<Self, ::mavlink_core::error::ParserError> {
42206        let avail_len = __input.len();
42207        let mut payload_buf = [0; Self::ENCODED_LEN];
42208        let mut buf = if avail_len < Self::ENCODED_LEN {
42209            payload_buf[0..avail_len].copy_from_slice(__input);
42210            Bytes::new(&payload_buf)
42211        } else {
42212            Bytes::new(__input)
42213        };
42214        let mut __struct = Self::default();
42215        __struct.usec = buf.get_u64_le()?;
42216        __struct.x = buf.get_f32_le()?;
42217        __struct.y = buf.get_f32_le()?;
42218        __struct.z = buf.get_f32_le()?;
42219        __struct.roll = buf.get_f32_le()?;
42220        __struct.pitch = buf.get_f32_le()?;
42221        __struct.yaw = buf.get_f32_le()?;
42222        for v in &mut __struct.covariance {
42223            let val = buf.get_f32_le()?;
42224            *v = val;
42225        }
42226        Ok(__struct)
42227    }
42228    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
42229        let mut __tmp = BytesMut::new(bytes);
42230        #[allow(clippy::absurd_extreme_comparisons)]
42231        #[allow(unused_comparisons)]
42232        if __tmp.remaining() < Self::ENCODED_LEN {
42233            panic!(
42234                "buffer is too small (need {} bytes, but got {})",
42235                Self::ENCODED_LEN,
42236                __tmp.remaining(),
42237            )
42238        }
42239        __tmp.put_u64_le(self.usec);
42240        __tmp.put_f32_le(self.x);
42241        __tmp.put_f32_le(self.y);
42242        __tmp.put_f32_le(self.z);
42243        __tmp.put_f32_le(self.roll);
42244        __tmp.put_f32_le(self.pitch);
42245        __tmp.put_f32_le(self.yaw);
42246        if matches!(version, MavlinkVersion::V2) {
42247            for val in &self.covariance {
42248                __tmp.put_f32_le(*val);
42249            }
42250            let len = __tmp.len();
42251            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
42252        } else {
42253            __tmp.len()
42254        }
42255    }
42256}
42257#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
42258#[doc = ""]
42259#[doc = "ID: 269"]
42260#[derive(Debug, Clone, PartialEq)]
42261#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
42262#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
42263#[cfg_attr(feature = "ts", derive(TS))]
42264#[cfg_attr(feature = "ts", ts(export))]
42265pub struct VIDEO_STREAM_INFORMATION_DATA {
42266    #[doc = "Frame rate."]
42267    pub framerate: f32,
42268    #[doc = "Bit rate."]
42269    pub bitrate: u32,
42270    #[doc = "Bitmap of stream status flags."]
42271    pub flags: VideoStreamStatusFlags,
42272    #[doc = "Horizontal resolution."]
42273    pub resolution_h: u16,
42274    #[doc = "Vertical resolution."]
42275    pub resolution_v: u16,
42276    #[doc = "Video image rotation clockwise."]
42277    pub rotation: u16,
42278    #[doc = "Horizontal Field of view."]
42279    pub hfov: u16,
42280    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
42281    pub stream_id: u8,
42282    #[doc = "Number of streams available."]
42283    pub count: u8,
42284    #[doc = "Type of stream."]
42285    pub mavtype: VideoStreamType,
42286    #[doc = "Stream name."]
42287    #[cfg_attr(feature = "ts", ts(type = "string"))]
42288    pub name: CharArray<32>,
42289    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
42290    #[cfg_attr(feature = "ts", ts(type = "string"))]
42291    pub uri: CharArray<160>,
42292    #[doc = "Encoding of stream."]
42293    #[cfg_attr(feature = "serde", serde(default))]
42294    pub encoding: VideoStreamEncoding,
42295    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
42296    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
42297    pub camera_device_id: u8,
42298}
42299impl VIDEO_STREAM_INFORMATION_DATA {
42300    pub const ENCODED_LEN: usize = 215usize;
42301    pub const DEFAULT: Self = Self {
42302        framerate: 0.0_f32,
42303        bitrate: 0_u32,
42304        flags: VideoStreamStatusFlags::DEFAULT,
42305        resolution_h: 0_u16,
42306        resolution_v: 0_u16,
42307        rotation: 0_u16,
42308        hfov: 0_u16,
42309        stream_id: 0_u8,
42310        count: 0_u8,
42311        mavtype: VideoStreamType::DEFAULT,
42312        name: CharArray::new([0_u8; 32usize]),
42313        uri: CharArray::new([0_u8; 160usize]),
42314        encoding: VideoStreamEncoding::DEFAULT,
42315        camera_device_id: 0_u8,
42316    };
42317    #[cfg(feature = "arbitrary")]
42318    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
42319        use arbitrary::{Arbitrary, Unstructured};
42320        let mut buf = [0u8; 1024];
42321        rng.fill_bytes(&mut buf);
42322        let mut unstructured = Unstructured::new(&buf);
42323        Self::arbitrary(&mut unstructured).unwrap_or_default()
42324    }
42325}
42326impl Default for VIDEO_STREAM_INFORMATION_DATA {
42327    fn default() -> Self {
42328        Self::DEFAULT.clone()
42329    }
42330}
42331impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
42332    type Message = MavMessage;
42333    const ID: u32 = 269u32;
42334    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
42335    const EXTRA_CRC: u8 = 109u8;
42336    const ENCODED_LEN: usize = 215usize;
42337    fn deser(
42338        _version: MavlinkVersion,
42339        __input: &[u8],
42340    ) -> Result<Self, ::mavlink_core::error::ParserError> {
42341        let avail_len = __input.len();
42342        let mut payload_buf = [0; Self::ENCODED_LEN];
42343        let mut buf = if avail_len < Self::ENCODED_LEN {
42344            payload_buf[0..avail_len].copy_from_slice(__input);
42345            Bytes::new(&payload_buf)
42346        } else {
42347            Bytes::new(__input)
42348        };
42349        let mut __struct = Self::default();
42350        __struct.framerate = buf.get_f32_le()?;
42351        __struct.bitrate = buf.get_u32_le()?;
42352        let tmp = buf.get_u16_le()?;
42353        __struct.flags =
42354            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
42355                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
42356                    flag_type: "VideoStreamStatusFlags",
42357                    value: tmp as u64,
42358                })?;
42359        __struct.resolution_h = buf.get_u16_le()?;
42360        __struct.resolution_v = buf.get_u16_le()?;
42361        __struct.rotation = buf.get_u16_le()?;
42362        __struct.hfov = buf.get_u16_le()?;
42363        __struct.stream_id = buf.get_u8()?;
42364        __struct.count = buf.get_u8()?;
42365        let tmp = buf.get_u8()?;
42366        __struct.mavtype =
42367            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
42368                enum_type: "VideoStreamType",
42369                value: tmp as u64,
42370            })?;
42371        let mut tmp = [0_u8; 32usize];
42372        for v in &mut tmp {
42373            *v = buf.get_u8()?;
42374        }
42375        __struct.name = CharArray::new(tmp);
42376        let mut tmp = [0_u8; 160usize];
42377        for v in &mut tmp {
42378            *v = buf.get_u8()?;
42379        }
42380        __struct.uri = CharArray::new(tmp);
42381        let tmp = buf.get_u8()?;
42382        __struct.encoding =
42383            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
42384                enum_type: "VideoStreamEncoding",
42385                value: tmp as u64,
42386            })?;
42387        __struct.camera_device_id = buf.get_u8()?;
42388        Ok(__struct)
42389    }
42390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
42391        let mut __tmp = BytesMut::new(bytes);
42392        #[allow(clippy::absurd_extreme_comparisons)]
42393        #[allow(unused_comparisons)]
42394        if __tmp.remaining() < Self::ENCODED_LEN {
42395            panic!(
42396                "buffer is too small (need {} bytes, but got {})",
42397                Self::ENCODED_LEN,
42398                __tmp.remaining(),
42399            )
42400        }
42401        __tmp.put_f32_le(self.framerate);
42402        __tmp.put_u32_le(self.bitrate);
42403        __tmp.put_u16_le(self.flags.bits() as u16);
42404        __tmp.put_u16_le(self.resolution_h);
42405        __tmp.put_u16_le(self.resolution_v);
42406        __tmp.put_u16_le(self.rotation);
42407        __tmp.put_u16_le(self.hfov);
42408        __tmp.put_u8(self.stream_id);
42409        __tmp.put_u8(self.count);
42410        __tmp.put_u8(self.mavtype as u8);
42411        for val in &self.name {
42412            __tmp.put_u8(*val);
42413        }
42414        for val in &self.uri {
42415            __tmp.put_u8(*val);
42416        }
42417        if matches!(version, MavlinkVersion::V2) {
42418            __tmp.put_u8(self.encoding as u8);
42419            __tmp.put_u8(self.camera_device_id);
42420            let len = __tmp.len();
42421            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
42422        } else {
42423            __tmp.len()
42424        }
42425    }
42426}
42427#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
42428#[doc = ""]
42429#[doc = "ID: 270"]
42430#[derive(Debug, Clone, PartialEq)]
42431#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
42432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
42433#[cfg_attr(feature = "ts", derive(TS))]
42434#[cfg_attr(feature = "ts", ts(export))]
42435pub struct VIDEO_STREAM_STATUS_DATA {
42436    #[doc = "Frame rate"]
42437    pub framerate: f32,
42438    #[doc = "Bit rate"]
42439    pub bitrate: u32,
42440    #[doc = "Bitmap of stream status flags"]
42441    pub flags: VideoStreamStatusFlags,
42442    #[doc = "Horizontal resolution"]
42443    pub resolution_h: u16,
42444    #[doc = "Vertical resolution"]
42445    pub resolution_v: u16,
42446    #[doc = "Video image rotation clockwise"]
42447    pub rotation: u16,
42448    #[doc = "Horizontal Field of view"]
42449    pub hfov: u16,
42450    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
42451    pub stream_id: u8,
42452    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
42453    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
42454    pub camera_device_id: u8,
42455}
42456impl VIDEO_STREAM_STATUS_DATA {
42457    pub const ENCODED_LEN: usize = 20usize;
42458    pub const DEFAULT: Self = Self {
42459        framerate: 0.0_f32,
42460        bitrate: 0_u32,
42461        flags: VideoStreamStatusFlags::DEFAULT,
42462        resolution_h: 0_u16,
42463        resolution_v: 0_u16,
42464        rotation: 0_u16,
42465        hfov: 0_u16,
42466        stream_id: 0_u8,
42467        camera_device_id: 0_u8,
42468    };
42469    #[cfg(feature = "arbitrary")]
42470    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
42471        use arbitrary::{Arbitrary, Unstructured};
42472        let mut buf = [0u8; 1024];
42473        rng.fill_bytes(&mut buf);
42474        let mut unstructured = Unstructured::new(&buf);
42475        Self::arbitrary(&mut unstructured).unwrap_or_default()
42476    }
42477}
42478impl Default for VIDEO_STREAM_STATUS_DATA {
42479    fn default() -> Self {
42480        Self::DEFAULT.clone()
42481    }
42482}
42483impl MessageData for VIDEO_STREAM_STATUS_DATA {
42484    type Message = MavMessage;
42485    const ID: u32 = 270u32;
42486    const NAME: &'static str = "VIDEO_STREAM_STATUS";
42487    const EXTRA_CRC: u8 = 59u8;
42488    const ENCODED_LEN: usize = 20usize;
42489    fn deser(
42490        _version: MavlinkVersion,
42491        __input: &[u8],
42492    ) -> Result<Self, ::mavlink_core::error::ParserError> {
42493        let avail_len = __input.len();
42494        let mut payload_buf = [0; Self::ENCODED_LEN];
42495        let mut buf = if avail_len < Self::ENCODED_LEN {
42496            payload_buf[0..avail_len].copy_from_slice(__input);
42497            Bytes::new(&payload_buf)
42498        } else {
42499            Bytes::new(__input)
42500        };
42501        let mut __struct = Self::default();
42502        __struct.framerate = buf.get_f32_le()?;
42503        __struct.bitrate = buf.get_u32_le()?;
42504        let tmp = buf.get_u16_le()?;
42505        __struct.flags =
42506            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
42507                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
42508                    flag_type: "VideoStreamStatusFlags",
42509                    value: tmp as u64,
42510                })?;
42511        __struct.resolution_h = buf.get_u16_le()?;
42512        __struct.resolution_v = buf.get_u16_le()?;
42513        __struct.rotation = buf.get_u16_le()?;
42514        __struct.hfov = buf.get_u16_le()?;
42515        __struct.stream_id = buf.get_u8()?;
42516        __struct.camera_device_id = buf.get_u8()?;
42517        Ok(__struct)
42518    }
42519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
42520        let mut __tmp = BytesMut::new(bytes);
42521        #[allow(clippy::absurd_extreme_comparisons)]
42522        #[allow(unused_comparisons)]
42523        if __tmp.remaining() < Self::ENCODED_LEN {
42524            panic!(
42525                "buffer is too small (need {} bytes, but got {})",
42526                Self::ENCODED_LEN,
42527                __tmp.remaining(),
42528            )
42529        }
42530        __tmp.put_f32_le(self.framerate);
42531        __tmp.put_u32_le(self.bitrate);
42532        __tmp.put_u16_le(self.flags.bits() as u16);
42533        __tmp.put_u16_le(self.resolution_h);
42534        __tmp.put_u16_le(self.resolution_v);
42535        __tmp.put_u16_le(self.rotation);
42536        __tmp.put_u16_le(self.hfov);
42537        __tmp.put_u8(self.stream_id);
42538        if matches!(version, MavlinkVersion::V2) {
42539            __tmp.put_u8(self.camera_device_id);
42540            let len = __tmp.len();
42541            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
42542        } else {
42543            __tmp.len()
42544        }
42545    }
42546}
42547#[doc = "Camera vision based attitude and position deltas."]
42548#[doc = ""]
42549#[doc = "ID: 11011"]
42550#[derive(Debug, Clone, PartialEq)]
42551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
42552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
42553#[cfg_attr(feature = "ts", derive(TS))]
42554#[cfg_attr(feature = "ts", ts(export))]
42555pub struct VISION_POSITION_DELTA_DATA {
42556    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
42557    pub time_usec: u64,
42558    #[doc = "Time since the last reported camera frame."]
42559    pub time_delta_usec: u64,
42560    #[doc = "Defines a rotation vector [roll, pitch, yaw] to the current MAV_FRAME_BODY_FRD from the previous MAV_FRAME_BODY_FRD."]
42561    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
42562    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
42563    pub angle_delta: [f32; 3],
42564    #[doc = "Change in position to the current MAV_FRAME_BODY_FRD from the previous FRAME_BODY_FRD rotated to the current MAV_FRAME_BODY_FRD."]
42565    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
42566    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
42567    pub position_delta: [f32; 3],
42568    #[doc = "Normalised confidence value from 0 to 100."]
42569    pub confidence: f32,
42570}
42571impl VISION_POSITION_DELTA_DATA {
42572    pub const ENCODED_LEN: usize = 44usize;
42573    pub const DEFAULT: Self = Self {
42574        time_usec: 0_u64,
42575        time_delta_usec: 0_u64,
42576        angle_delta: [0.0_f32; 3usize],
42577        position_delta: [0.0_f32; 3usize],
42578        confidence: 0.0_f32,
42579    };
42580    #[cfg(feature = "arbitrary")]
42581    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
42582        use arbitrary::{Arbitrary, Unstructured};
42583        let mut buf = [0u8; 1024];
42584        rng.fill_bytes(&mut buf);
42585        let mut unstructured = Unstructured::new(&buf);
42586        Self::arbitrary(&mut unstructured).unwrap_or_default()
42587    }
42588}
42589impl Default for VISION_POSITION_DELTA_DATA {
42590    fn default() -> Self {
42591        Self::DEFAULT.clone()
42592    }
42593}
42594impl MessageData for VISION_POSITION_DELTA_DATA {
42595    type Message = MavMessage;
42596    const ID: u32 = 11011u32;
42597    const NAME: &'static str = "VISION_POSITION_DELTA";
42598    const EXTRA_CRC: u8 = 106u8;
42599    const ENCODED_LEN: usize = 44usize;
42600    fn deser(
42601        _version: MavlinkVersion,
42602        __input: &[u8],
42603    ) -> Result<Self, ::mavlink_core::error::ParserError> {
42604        let avail_len = __input.len();
42605        let mut payload_buf = [0; Self::ENCODED_LEN];
42606        let mut buf = if avail_len < Self::ENCODED_LEN {
42607            payload_buf[0..avail_len].copy_from_slice(__input);
42608            Bytes::new(&payload_buf)
42609        } else {
42610            Bytes::new(__input)
42611        };
42612        let mut __struct = Self::default();
42613        __struct.time_usec = buf.get_u64_le()?;
42614        __struct.time_delta_usec = buf.get_u64_le()?;
42615        for v in &mut __struct.angle_delta {
42616            let val = buf.get_f32_le()?;
42617            *v = val;
42618        }
42619        for v in &mut __struct.position_delta {
42620            let val = buf.get_f32_le()?;
42621            *v = val;
42622        }
42623        __struct.confidence = buf.get_f32_le()?;
42624        Ok(__struct)
42625    }
42626    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
42627        let mut __tmp = BytesMut::new(bytes);
42628        #[allow(clippy::absurd_extreme_comparisons)]
42629        #[allow(unused_comparisons)]
42630        if __tmp.remaining() < Self::ENCODED_LEN {
42631            panic!(
42632                "buffer is too small (need {} bytes, but got {})",
42633                Self::ENCODED_LEN,
42634                __tmp.remaining(),
42635            )
42636        }
42637        __tmp.put_u64_le(self.time_usec);
42638        __tmp.put_u64_le(self.time_delta_usec);
42639        for val in &self.angle_delta {
42640            __tmp.put_f32_le(*val);
42641        }
42642        for val in &self.position_delta {
42643            __tmp.put_f32_le(*val);
42644        }
42645        __tmp.put_f32_le(self.confidence);
42646        if matches!(version, MavlinkVersion::V2) {
42647            let len = __tmp.len();
42648            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
42649        } else {
42650            __tmp.len()
42651        }
42652    }
42653}
42654#[doc = "Local position/attitude estimate from a vision source."]
42655#[doc = ""]
42656#[doc = "ID: 102"]
42657#[derive(Debug, Clone, PartialEq)]
42658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
42659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
42660#[cfg_attr(feature = "ts", derive(TS))]
42661#[cfg_attr(feature = "ts", ts(export))]
42662pub struct VISION_POSITION_ESTIMATE_DATA {
42663    #[doc = "Timestamp (UNIX time or time since system boot)"]
42664    pub usec: u64,
42665    #[doc = "Local X position"]
42666    pub x: f32,
42667    #[doc = "Local Y position"]
42668    pub y: f32,
42669    #[doc = "Local Z position"]
42670    pub z: f32,
42671    #[doc = "Roll angle"]
42672    pub roll: f32,
42673    #[doc = "Pitch angle"]
42674    pub pitch: f32,
42675    #[doc = "Yaw angle"]
42676    pub yaw: f32,
42677    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
42678    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
42679    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
42680    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
42681    pub covariance: [f32; 21],
42682    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
42683    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
42684    pub reset_counter: u8,
42685}
42686impl VISION_POSITION_ESTIMATE_DATA {
42687    pub const ENCODED_LEN: usize = 117usize;
42688    pub const DEFAULT: Self = Self {
42689        usec: 0_u64,
42690        x: 0.0_f32,
42691        y: 0.0_f32,
42692        z: 0.0_f32,
42693        roll: 0.0_f32,
42694        pitch: 0.0_f32,
42695        yaw: 0.0_f32,
42696        covariance: [0.0_f32; 21usize],
42697        reset_counter: 0_u8,
42698    };
42699    #[cfg(feature = "arbitrary")]
42700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
42701        use arbitrary::{Arbitrary, Unstructured};
42702        let mut buf = [0u8; 1024];
42703        rng.fill_bytes(&mut buf);
42704        let mut unstructured = Unstructured::new(&buf);
42705        Self::arbitrary(&mut unstructured).unwrap_or_default()
42706    }
42707}
42708impl Default for VISION_POSITION_ESTIMATE_DATA {
42709    fn default() -> Self {
42710        Self::DEFAULT.clone()
42711    }
42712}
42713impl MessageData for VISION_POSITION_ESTIMATE_DATA {
42714    type Message = MavMessage;
42715    const ID: u32 = 102u32;
42716    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
42717    const EXTRA_CRC: u8 = 158u8;
42718    const ENCODED_LEN: usize = 117usize;
42719    fn deser(
42720        _version: MavlinkVersion,
42721        __input: &[u8],
42722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
42723        let avail_len = __input.len();
42724        let mut payload_buf = [0; Self::ENCODED_LEN];
42725        let mut buf = if avail_len < Self::ENCODED_LEN {
42726            payload_buf[0..avail_len].copy_from_slice(__input);
42727            Bytes::new(&payload_buf)
42728        } else {
42729            Bytes::new(__input)
42730        };
42731        let mut __struct = Self::default();
42732        __struct.usec = buf.get_u64_le()?;
42733        __struct.x = buf.get_f32_le()?;
42734        __struct.y = buf.get_f32_le()?;
42735        __struct.z = buf.get_f32_le()?;
42736        __struct.roll = buf.get_f32_le()?;
42737        __struct.pitch = buf.get_f32_le()?;
42738        __struct.yaw = buf.get_f32_le()?;
42739        for v in &mut __struct.covariance {
42740            let val = buf.get_f32_le()?;
42741            *v = val;
42742        }
42743        __struct.reset_counter = buf.get_u8()?;
42744        Ok(__struct)
42745    }
42746    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
42747        let mut __tmp = BytesMut::new(bytes);
42748        #[allow(clippy::absurd_extreme_comparisons)]
42749        #[allow(unused_comparisons)]
42750        if __tmp.remaining() < Self::ENCODED_LEN {
42751            panic!(
42752                "buffer is too small (need {} bytes, but got {})",
42753                Self::ENCODED_LEN,
42754                __tmp.remaining(),
42755            )
42756        }
42757        __tmp.put_u64_le(self.usec);
42758        __tmp.put_f32_le(self.x);
42759        __tmp.put_f32_le(self.y);
42760        __tmp.put_f32_le(self.z);
42761        __tmp.put_f32_le(self.roll);
42762        __tmp.put_f32_le(self.pitch);
42763        __tmp.put_f32_le(self.yaw);
42764        if matches!(version, MavlinkVersion::V2) {
42765            for val in &self.covariance {
42766                __tmp.put_f32_le(*val);
42767            }
42768            __tmp.put_u8(self.reset_counter);
42769            let len = __tmp.len();
42770            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
42771        } else {
42772            __tmp.len()
42773        }
42774    }
42775}
42776#[doc = "Speed estimate from a vision source."]
42777#[doc = ""]
42778#[doc = "ID: 103"]
42779#[derive(Debug, Clone, PartialEq)]
42780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
42781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
42782#[cfg_attr(feature = "ts", derive(TS))]
42783#[cfg_attr(feature = "ts", ts(export))]
42784pub struct VISION_SPEED_ESTIMATE_DATA {
42785    #[doc = "Timestamp (UNIX time or time since system boot)"]
42786    pub usec: u64,
42787    #[doc = "Global X speed"]
42788    pub x: f32,
42789    #[doc = "Global Y speed"]
42790    pub y: f32,
42791    #[doc = "Global Z speed"]
42792    pub z: f32,
42793    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
42794    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
42795    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
42796    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
42797    pub covariance: [f32; 9],
42798    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
42799    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
42800    pub reset_counter: u8,
42801}
42802impl VISION_SPEED_ESTIMATE_DATA {
42803    pub const ENCODED_LEN: usize = 57usize;
42804    pub const DEFAULT: Self = Self {
42805        usec: 0_u64,
42806        x: 0.0_f32,
42807        y: 0.0_f32,
42808        z: 0.0_f32,
42809        covariance: [0.0_f32; 9usize],
42810        reset_counter: 0_u8,
42811    };
42812    #[cfg(feature = "arbitrary")]
42813    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
42814        use arbitrary::{Arbitrary, Unstructured};
42815        let mut buf = [0u8; 1024];
42816        rng.fill_bytes(&mut buf);
42817        let mut unstructured = Unstructured::new(&buf);
42818        Self::arbitrary(&mut unstructured).unwrap_or_default()
42819    }
42820}
42821impl Default for VISION_SPEED_ESTIMATE_DATA {
42822    fn default() -> Self {
42823        Self::DEFAULT.clone()
42824    }
42825}
42826impl MessageData for VISION_SPEED_ESTIMATE_DATA {
42827    type Message = MavMessage;
42828    const ID: u32 = 103u32;
42829    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
42830    const EXTRA_CRC: u8 = 208u8;
42831    const ENCODED_LEN: usize = 57usize;
42832    fn deser(
42833        _version: MavlinkVersion,
42834        __input: &[u8],
42835    ) -> Result<Self, ::mavlink_core::error::ParserError> {
42836        let avail_len = __input.len();
42837        let mut payload_buf = [0; Self::ENCODED_LEN];
42838        let mut buf = if avail_len < Self::ENCODED_LEN {
42839            payload_buf[0..avail_len].copy_from_slice(__input);
42840            Bytes::new(&payload_buf)
42841        } else {
42842            Bytes::new(__input)
42843        };
42844        let mut __struct = Self::default();
42845        __struct.usec = buf.get_u64_le()?;
42846        __struct.x = buf.get_f32_le()?;
42847        __struct.y = buf.get_f32_le()?;
42848        __struct.z = buf.get_f32_le()?;
42849        for v in &mut __struct.covariance {
42850            let val = buf.get_f32_le()?;
42851            *v = val;
42852        }
42853        __struct.reset_counter = buf.get_u8()?;
42854        Ok(__struct)
42855    }
42856    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
42857        let mut __tmp = BytesMut::new(bytes);
42858        #[allow(clippy::absurd_extreme_comparisons)]
42859        #[allow(unused_comparisons)]
42860        if __tmp.remaining() < Self::ENCODED_LEN {
42861            panic!(
42862                "buffer is too small (need {} bytes, but got {})",
42863                Self::ENCODED_LEN,
42864                __tmp.remaining(),
42865            )
42866        }
42867        __tmp.put_u64_le(self.usec);
42868        __tmp.put_f32_le(self.x);
42869        __tmp.put_f32_le(self.y);
42870        __tmp.put_f32_le(self.z);
42871        if matches!(version, MavlinkVersion::V2) {
42872            for val in &self.covariance {
42873                __tmp.put_f32_le(*val);
42874            }
42875            __tmp.put_u8(self.reset_counter);
42876            let len = __tmp.len();
42877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
42878        } else {
42879            __tmp.len()
42880        }
42881    }
42882}
42883#[doc = "Water depth."]
42884#[doc = ""]
42885#[doc = "ID: 11038"]
42886#[derive(Debug, Clone, PartialEq)]
42887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
42888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
42889#[cfg_attr(feature = "ts", derive(TS))]
42890#[cfg_attr(feature = "ts", ts(export))]
42891pub struct WATER_DEPTH_DATA {
42892    #[doc = "Timestamp (time since system boot)"]
42893    pub time_boot_ms: u32,
42894    #[doc = "Latitude"]
42895    pub lat: i32,
42896    #[doc = "Longitude"]
42897    pub lng: i32,
42898    #[doc = "Altitude (MSL) of vehicle"]
42899    pub alt: f32,
42900    #[doc = "Roll angle"]
42901    pub roll: f32,
42902    #[doc = "Pitch angle"]
42903    pub pitch: f32,
42904    #[doc = "Yaw angle"]
42905    pub yaw: f32,
42906    #[doc = "Distance (uncorrected)"]
42907    pub distance: f32,
42908    #[doc = "Water temperature"]
42909    pub temperature: f32,
42910    #[doc = "Onboard ID of the sensor"]
42911    pub id: u8,
42912    #[doc = "Sensor data healthy (0=unhealthy, 1=healthy)"]
42913    pub healthy: u8,
42914}
42915impl WATER_DEPTH_DATA {
42916    pub const ENCODED_LEN: usize = 38usize;
42917    pub const DEFAULT: Self = Self {
42918        time_boot_ms: 0_u32,
42919        lat: 0_i32,
42920        lng: 0_i32,
42921        alt: 0.0_f32,
42922        roll: 0.0_f32,
42923        pitch: 0.0_f32,
42924        yaw: 0.0_f32,
42925        distance: 0.0_f32,
42926        temperature: 0.0_f32,
42927        id: 0_u8,
42928        healthy: 0_u8,
42929    };
42930    #[cfg(feature = "arbitrary")]
42931    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
42932        use arbitrary::{Arbitrary, Unstructured};
42933        let mut buf = [0u8; 1024];
42934        rng.fill_bytes(&mut buf);
42935        let mut unstructured = Unstructured::new(&buf);
42936        Self::arbitrary(&mut unstructured).unwrap_or_default()
42937    }
42938}
42939impl Default for WATER_DEPTH_DATA {
42940    fn default() -> Self {
42941        Self::DEFAULT.clone()
42942    }
42943}
42944impl MessageData for WATER_DEPTH_DATA {
42945    type Message = MavMessage;
42946    const ID: u32 = 11038u32;
42947    const NAME: &'static str = "WATER_DEPTH";
42948    const EXTRA_CRC: u8 = 47u8;
42949    const ENCODED_LEN: usize = 38usize;
42950    fn deser(
42951        _version: MavlinkVersion,
42952        __input: &[u8],
42953    ) -> Result<Self, ::mavlink_core::error::ParserError> {
42954        let avail_len = __input.len();
42955        let mut payload_buf = [0; Self::ENCODED_LEN];
42956        let mut buf = if avail_len < Self::ENCODED_LEN {
42957            payload_buf[0..avail_len].copy_from_slice(__input);
42958            Bytes::new(&payload_buf)
42959        } else {
42960            Bytes::new(__input)
42961        };
42962        let mut __struct = Self::default();
42963        __struct.time_boot_ms = buf.get_u32_le()?;
42964        __struct.lat = buf.get_i32_le()?;
42965        __struct.lng = buf.get_i32_le()?;
42966        __struct.alt = buf.get_f32_le()?;
42967        __struct.roll = buf.get_f32_le()?;
42968        __struct.pitch = buf.get_f32_le()?;
42969        __struct.yaw = buf.get_f32_le()?;
42970        __struct.distance = buf.get_f32_le()?;
42971        __struct.temperature = buf.get_f32_le()?;
42972        __struct.id = buf.get_u8()?;
42973        __struct.healthy = buf.get_u8()?;
42974        Ok(__struct)
42975    }
42976    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
42977        let mut __tmp = BytesMut::new(bytes);
42978        #[allow(clippy::absurd_extreme_comparisons)]
42979        #[allow(unused_comparisons)]
42980        if __tmp.remaining() < Self::ENCODED_LEN {
42981            panic!(
42982                "buffer is too small (need {} bytes, but got {})",
42983                Self::ENCODED_LEN,
42984                __tmp.remaining(),
42985            )
42986        }
42987        __tmp.put_u32_le(self.time_boot_ms);
42988        __tmp.put_i32_le(self.lat);
42989        __tmp.put_i32_le(self.lng);
42990        __tmp.put_f32_le(self.alt);
42991        __tmp.put_f32_le(self.roll);
42992        __tmp.put_f32_le(self.pitch);
42993        __tmp.put_f32_le(self.yaw);
42994        __tmp.put_f32_le(self.distance);
42995        __tmp.put_f32_le(self.temperature);
42996        __tmp.put_u8(self.id);
42997        __tmp.put_u8(self.healthy);
42998        if matches!(version, MavlinkVersion::V2) {
42999            let len = __tmp.len();
43000            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
43001        } else {
43002            __tmp.len()
43003        }
43004    }
43005}
43006#[doc = "Cumulative distance traveled for each reported wheel."]
43007#[doc = ""]
43008#[doc = "ID: 9000"]
43009#[derive(Debug, Clone, PartialEq)]
43010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
43011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
43012#[cfg_attr(feature = "ts", derive(TS))]
43013#[cfg_attr(feature = "ts", ts(export))]
43014pub struct WHEEL_DISTANCE_DATA {
43015    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
43016    pub time_usec: u64,
43017    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
43018    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
43019    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
43020    pub distance: [f64; 16],
43021    #[doc = "Number of wheels reported."]
43022    pub count: u8,
43023}
43024impl WHEEL_DISTANCE_DATA {
43025    pub const ENCODED_LEN: usize = 137usize;
43026    pub const DEFAULT: Self = Self {
43027        time_usec: 0_u64,
43028        distance: [0.0_f64; 16usize],
43029        count: 0_u8,
43030    };
43031    #[cfg(feature = "arbitrary")]
43032    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
43033        use arbitrary::{Arbitrary, Unstructured};
43034        let mut buf = [0u8; 1024];
43035        rng.fill_bytes(&mut buf);
43036        let mut unstructured = Unstructured::new(&buf);
43037        Self::arbitrary(&mut unstructured).unwrap_or_default()
43038    }
43039}
43040impl Default for WHEEL_DISTANCE_DATA {
43041    fn default() -> Self {
43042        Self::DEFAULT.clone()
43043    }
43044}
43045impl MessageData for WHEEL_DISTANCE_DATA {
43046    type Message = MavMessage;
43047    const ID: u32 = 9000u32;
43048    const NAME: &'static str = "WHEEL_DISTANCE";
43049    const EXTRA_CRC: u8 = 113u8;
43050    const ENCODED_LEN: usize = 137usize;
43051    fn deser(
43052        _version: MavlinkVersion,
43053        __input: &[u8],
43054    ) -> Result<Self, ::mavlink_core::error::ParserError> {
43055        let avail_len = __input.len();
43056        let mut payload_buf = [0; Self::ENCODED_LEN];
43057        let mut buf = if avail_len < Self::ENCODED_LEN {
43058            payload_buf[0..avail_len].copy_from_slice(__input);
43059            Bytes::new(&payload_buf)
43060        } else {
43061            Bytes::new(__input)
43062        };
43063        let mut __struct = Self::default();
43064        __struct.time_usec = buf.get_u64_le()?;
43065        for v in &mut __struct.distance {
43066            let val = buf.get_f64_le()?;
43067            *v = val;
43068        }
43069        __struct.count = buf.get_u8()?;
43070        Ok(__struct)
43071    }
43072    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
43073        let mut __tmp = BytesMut::new(bytes);
43074        #[allow(clippy::absurd_extreme_comparisons)]
43075        #[allow(unused_comparisons)]
43076        if __tmp.remaining() < Self::ENCODED_LEN {
43077            panic!(
43078                "buffer is too small (need {} bytes, but got {})",
43079                Self::ENCODED_LEN,
43080                __tmp.remaining(),
43081            )
43082        }
43083        __tmp.put_u64_le(self.time_usec);
43084        for val in &self.distance {
43085            __tmp.put_f64_le(*val);
43086        }
43087        __tmp.put_u8(self.count);
43088        if matches!(version, MavlinkVersion::V2) {
43089            let len = __tmp.len();
43090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
43091        } else {
43092            __tmp.len()
43093        }
43094    }
43095}
43096#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
43097#[doc = ""]
43098#[doc = "ID: 299"]
43099#[derive(Debug, Clone, PartialEq)]
43100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
43101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
43102#[cfg_attr(feature = "ts", derive(TS))]
43103#[cfg_attr(feature = "ts", ts(export))]
43104pub struct WIFI_CONFIG_AP_DATA {
43105    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
43106    #[cfg_attr(feature = "ts", ts(type = "string"))]
43107    pub ssid: CharArray<32>,
43108    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
43109    #[cfg_attr(feature = "ts", ts(type = "string"))]
43110    pub password: CharArray<64>,
43111    #[doc = "WiFi Mode."]
43112    #[cfg_attr(feature = "serde", serde(default))]
43113    pub mode: WifiConfigApMode,
43114    #[doc = "Message acceptance response (sent back to GS)."]
43115    #[cfg_attr(feature = "serde", serde(default))]
43116    pub response: WifiConfigApResponse,
43117}
43118impl WIFI_CONFIG_AP_DATA {
43119    pub const ENCODED_LEN: usize = 98usize;
43120    pub const DEFAULT: Self = Self {
43121        ssid: CharArray::new([0_u8; 32usize]),
43122        password: CharArray::new([0_u8; 64usize]),
43123        mode: WifiConfigApMode::DEFAULT,
43124        response: WifiConfigApResponse::DEFAULT,
43125    };
43126    #[cfg(feature = "arbitrary")]
43127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
43128        use arbitrary::{Arbitrary, Unstructured};
43129        let mut buf = [0u8; 1024];
43130        rng.fill_bytes(&mut buf);
43131        let mut unstructured = Unstructured::new(&buf);
43132        Self::arbitrary(&mut unstructured).unwrap_or_default()
43133    }
43134}
43135impl Default for WIFI_CONFIG_AP_DATA {
43136    fn default() -> Self {
43137        Self::DEFAULT.clone()
43138    }
43139}
43140impl MessageData for WIFI_CONFIG_AP_DATA {
43141    type Message = MavMessage;
43142    const ID: u32 = 299u32;
43143    const NAME: &'static str = "WIFI_CONFIG_AP";
43144    const EXTRA_CRC: u8 = 19u8;
43145    const ENCODED_LEN: usize = 98usize;
43146    fn deser(
43147        _version: MavlinkVersion,
43148        __input: &[u8],
43149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
43150        let avail_len = __input.len();
43151        let mut payload_buf = [0; Self::ENCODED_LEN];
43152        let mut buf = if avail_len < Self::ENCODED_LEN {
43153            payload_buf[0..avail_len].copy_from_slice(__input);
43154            Bytes::new(&payload_buf)
43155        } else {
43156            Bytes::new(__input)
43157        };
43158        let mut __struct = Self::default();
43159        let mut tmp = [0_u8; 32usize];
43160        for v in &mut tmp {
43161            *v = buf.get_u8()?;
43162        }
43163        __struct.ssid = CharArray::new(tmp);
43164        let mut tmp = [0_u8; 64usize];
43165        for v in &mut tmp {
43166            *v = buf.get_u8()?;
43167        }
43168        __struct.password = CharArray::new(tmp);
43169        let tmp = buf.get_i8()?;
43170        __struct.mode =
43171            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
43172                enum_type: "WifiConfigApMode",
43173                value: tmp as u64,
43174            })?;
43175        let tmp = buf.get_i8()?;
43176        __struct.response =
43177            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
43178                enum_type: "WifiConfigApResponse",
43179                value: tmp as u64,
43180            })?;
43181        Ok(__struct)
43182    }
43183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
43184        let mut __tmp = BytesMut::new(bytes);
43185        #[allow(clippy::absurd_extreme_comparisons)]
43186        #[allow(unused_comparisons)]
43187        if __tmp.remaining() < Self::ENCODED_LEN {
43188            panic!(
43189                "buffer is too small (need {} bytes, but got {})",
43190                Self::ENCODED_LEN,
43191                __tmp.remaining(),
43192            )
43193        }
43194        for val in &self.ssid {
43195            __tmp.put_u8(*val);
43196        }
43197        for val in &self.password {
43198            __tmp.put_u8(*val);
43199        }
43200        if matches!(version, MavlinkVersion::V2) {
43201            __tmp.put_i8(self.mode as i8);
43202            __tmp.put_i8(self.response as i8);
43203            let len = __tmp.len();
43204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
43205        } else {
43206            __tmp.len()
43207        }
43208    }
43209}
43210#[doc = "Winch status."]
43211#[doc = ""]
43212#[doc = "ID: 9005"]
43213#[derive(Debug, Clone, PartialEq)]
43214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
43215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
43216#[cfg_attr(feature = "ts", derive(TS))]
43217#[cfg_attr(feature = "ts", ts(export))]
43218pub struct WINCH_STATUS_DATA {
43219    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
43220    pub time_usec: u64,
43221    #[doc = "Length of line released. NaN if unknown"]
43222    pub line_length: f32,
43223    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
43224    pub speed: f32,
43225    #[doc = "Tension on the line. NaN if unknown"]
43226    pub tension: f32,
43227    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
43228    pub voltage: f32,
43229    #[doc = "Current draw from the winch. NaN if unknown"]
43230    pub current: f32,
43231    #[doc = "Status flags"]
43232    pub status: MavWinchStatusFlag,
43233    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
43234    pub temperature: i16,
43235}
43236impl WINCH_STATUS_DATA {
43237    pub const ENCODED_LEN: usize = 34usize;
43238    pub const DEFAULT: Self = Self {
43239        time_usec: 0_u64,
43240        line_length: 0.0_f32,
43241        speed: 0.0_f32,
43242        tension: 0.0_f32,
43243        voltage: 0.0_f32,
43244        current: 0.0_f32,
43245        status: MavWinchStatusFlag::DEFAULT,
43246        temperature: 0_i16,
43247    };
43248    #[cfg(feature = "arbitrary")]
43249    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
43250        use arbitrary::{Arbitrary, Unstructured};
43251        let mut buf = [0u8; 1024];
43252        rng.fill_bytes(&mut buf);
43253        let mut unstructured = Unstructured::new(&buf);
43254        Self::arbitrary(&mut unstructured).unwrap_or_default()
43255    }
43256}
43257impl Default for WINCH_STATUS_DATA {
43258    fn default() -> Self {
43259        Self::DEFAULT.clone()
43260    }
43261}
43262impl MessageData for WINCH_STATUS_DATA {
43263    type Message = MavMessage;
43264    const ID: u32 = 9005u32;
43265    const NAME: &'static str = "WINCH_STATUS";
43266    const EXTRA_CRC: u8 = 117u8;
43267    const ENCODED_LEN: usize = 34usize;
43268    fn deser(
43269        _version: MavlinkVersion,
43270        __input: &[u8],
43271    ) -> Result<Self, ::mavlink_core::error::ParserError> {
43272        let avail_len = __input.len();
43273        let mut payload_buf = [0; Self::ENCODED_LEN];
43274        let mut buf = if avail_len < Self::ENCODED_LEN {
43275            payload_buf[0..avail_len].copy_from_slice(__input);
43276            Bytes::new(&payload_buf)
43277        } else {
43278            Bytes::new(__input)
43279        };
43280        let mut __struct = Self::default();
43281        __struct.time_usec = buf.get_u64_le()?;
43282        __struct.line_length = buf.get_f32_le()?;
43283        __struct.speed = buf.get_f32_le()?;
43284        __struct.tension = buf.get_f32_le()?;
43285        __struct.voltage = buf.get_f32_le()?;
43286        __struct.current = buf.get_f32_le()?;
43287        let tmp = buf.get_u32_le()?;
43288        __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
43289            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
43290                flag_type: "MavWinchStatusFlag",
43291                value: tmp as u64,
43292            })?;
43293        __struct.temperature = buf.get_i16_le()?;
43294        Ok(__struct)
43295    }
43296    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
43297        let mut __tmp = BytesMut::new(bytes);
43298        #[allow(clippy::absurd_extreme_comparisons)]
43299        #[allow(unused_comparisons)]
43300        if __tmp.remaining() < Self::ENCODED_LEN {
43301            panic!(
43302                "buffer is too small (need {} bytes, but got {})",
43303                Self::ENCODED_LEN,
43304                __tmp.remaining(),
43305            )
43306        }
43307        __tmp.put_u64_le(self.time_usec);
43308        __tmp.put_f32_le(self.line_length);
43309        __tmp.put_f32_le(self.speed);
43310        __tmp.put_f32_le(self.tension);
43311        __tmp.put_f32_le(self.voltage);
43312        __tmp.put_f32_le(self.current);
43313        __tmp.put_u32_le(self.status.bits() as u32);
43314        __tmp.put_i16_le(self.temperature);
43315        if matches!(version, MavlinkVersion::V2) {
43316            let len = __tmp.len();
43317            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
43318        } else {
43319            __tmp.len()
43320        }
43321    }
43322}
43323#[doc = "Wind estimation."]
43324#[doc = ""]
43325#[doc = "ID: 168"]
43326#[derive(Debug, Clone, PartialEq)]
43327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
43328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
43329#[cfg_attr(feature = "ts", derive(TS))]
43330#[cfg_attr(feature = "ts", ts(export))]
43331pub struct WIND_DATA {
43332    #[doc = "Wind direction (that wind is coming from)."]
43333    pub direction: f32,
43334    #[doc = "Wind speed in ground plane."]
43335    pub speed: f32,
43336    #[doc = "Vertical wind speed."]
43337    pub speed_z: f32,
43338}
43339impl WIND_DATA {
43340    pub const ENCODED_LEN: usize = 12usize;
43341    pub const DEFAULT: Self = Self {
43342        direction: 0.0_f32,
43343        speed: 0.0_f32,
43344        speed_z: 0.0_f32,
43345    };
43346    #[cfg(feature = "arbitrary")]
43347    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
43348        use arbitrary::{Arbitrary, Unstructured};
43349        let mut buf = [0u8; 1024];
43350        rng.fill_bytes(&mut buf);
43351        let mut unstructured = Unstructured::new(&buf);
43352        Self::arbitrary(&mut unstructured).unwrap_or_default()
43353    }
43354}
43355impl Default for WIND_DATA {
43356    fn default() -> Self {
43357        Self::DEFAULT.clone()
43358    }
43359}
43360impl MessageData for WIND_DATA {
43361    type Message = MavMessage;
43362    const ID: u32 = 168u32;
43363    const NAME: &'static str = "WIND";
43364    const EXTRA_CRC: u8 = 1u8;
43365    const ENCODED_LEN: usize = 12usize;
43366    fn deser(
43367        _version: MavlinkVersion,
43368        __input: &[u8],
43369    ) -> Result<Self, ::mavlink_core::error::ParserError> {
43370        let avail_len = __input.len();
43371        let mut payload_buf = [0; Self::ENCODED_LEN];
43372        let mut buf = if avail_len < Self::ENCODED_LEN {
43373            payload_buf[0..avail_len].copy_from_slice(__input);
43374            Bytes::new(&payload_buf)
43375        } else {
43376            Bytes::new(__input)
43377        };
43378        let mut __struct = Self::default();
43379        __struct.direction = buf.get_f32_le()?;
43380        __struct.speed = buf.get_f32_le()?;
43381        __struct.speed_z = buf.get_f32_le()?;
43382        Ok(__struct)
43383    }
43384    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
43385        let mut __tmp = BytesMut::new(bytes);
43386        #[allow(clippy::absurd_extreme_comparisons)]
43387        #[allow(unused_comparisons)]
43388        if __tmp.remaining() < Self::ENCODED_LEN {
43389            panic!(
43390                "buffer is too small (need {} bytes, but got {})",
43391                Self::ENCODED_LEN,
43392                __tmp.remaining(),
43393            )
43394        }
43395        __tmp.put_f32_le(self.direction);
43396        __tmp.put_f32_le(self.speed);
43397        __tmp.put_f32_le(self.speed_z);
43398        if matches!(version, MavlinkVersion::V2) {
43399            let len = __tmp.len();
43400            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
43401        } else {
43402            __tmp.len()
43403        }
43404    }
43405}
43406#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
43407#[doc = ""]
43408#[doc = "ID: 231"]
43409#[derive(Debug, Clone, PartialEq)]
43410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
43411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
43412#[cfg_attr(feature = "ts", derive(TS))]
43413#[cfg_attr(feature = "ts", ts(export))]
43414pub struct WIND_COV_DATA {
43415    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
43416    pub time_usec: u64,
43417    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
43418    pub wind_x: f32,
43419    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
43420    pub wind_y: f32,
43421    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
43422    pub wind_z: f32,
43423    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
43424    pub var_horiz: f32,
43425    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
43426    pub var_vert: f32,
43427    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
43428    pub wind_alt: f32,
43429    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
43430    pub horiz_accuracy: f32,
43431    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
43432    pub vert_accuracy: f32,
43433}
43434impl WIND_COV_DATA {
43435    pub const ENCODED_LEN: usize = 40usize;
43436    pub const DEFAULT: Self = Self {
43437        time_usec: 0_u64,
43438        wind_x: 0.0_f32,
43439        wind_y: 0.0_f32,
43440        wind_z: 0.0_f32,
43441        var_horiz: 0.0_f32,
43442        var_vert: 0.0_f32,
43443        wind_alt: 0.0_f32,
43444        horiz_accuracy: 0.0_f32,
43445        vert_accuracy: 0.0_f32,
43446    };
43447    #[cfg(feature = "arbitrary")]
43448    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
43449        use arbitrary::{Arbitrary, Unstructured};
43450        let mut buf = [0u8; 1024];
43451        rng.fill_bytes(&mut buf);
43452        let mut unstructured = Unstructured::new(&buf);
43453        Self::arbitrary(&mut unstructured).unwrap_or_default()
43454    }
43455}
43456impl Default for WIND_COV_DATA {
43457    fn default() -> Self {
43458        Self::DEFAULT.clone()
43459    }
43460}
43461impl MessageData for WIND_COV_DATA {
43462    type Message = MavMessage;
43463    const ID: u32 = 231u32;
43464    const NAME: &'static str = "WIND_COV";
43465    const EXTRA_CRC: u8 = 105u8;
43466    const ENCODED_LEN: usize = 40usize;
43467    fn deser(
43468        _version: MavlinkVersion,
43469        __input: &[u8],
43470    ) -> Result<Self, ::mavlink_core::error::ParserError> {
43471        let avail_len = __input.len();
43472        let mut payload_buf = [0; Self::ENCODED_LEN];
43473        let mut buf = if avail_len < Self::ENCODED_LEN {
43474            payload_buf[0..avail_len].copy_from_slice(__input);
43475            Bytes::new(&payload_buf)
43476        } else {
43477            Bytes::new(__input)
43478        };
43479        let mut __struct = Self::default();
43480        __struct.time_usec = buf.get_u64_le()?;
43481        __struct.wind_x = buf.get_f32_le()?;
43482        __struct.wind_y = buf.get_f32_le()?;
43483        __struct.wind_z = buf.get_f32_le()?;
43484        __struct.var_horiz = buf.get_f32_le()?;
43485        __struct.var_vert = buf.get_f32_le()?;
43486        __struct.wind_alt = buf.get_f32_le()?;
43487        __struct.horiz_accuracy = buf.get_f32_le()?;
43488        __struct.vert_accuracy = buf.get_f32_le()?;
43489        Ok(__struct)
43490    }
43491    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
43492        let mut __tmp = BytesMut::new(bytes);
43493        #[allow(clippy::absurd_extreme_comparisons)]
43494        #[allow(unused_comparisons)]
43495        if __tmp.remaining() < Self::ENCODED_LEN {
43496            panic!(
43497                "buffer is too small (need {} bytes, but got {})",
43498                Self::ENCODED_LEN,
43499                __tmp.remaining(),
43500            )
43501        }
43502        __tmp.put_u64_le(self.time_usec);
43503        __tmp.put_f32_le(self.wind_x);
43504        __tmp.put_f32_le(self.wind_y);
43505        __tmp.put_f32_le(self.wind_z);
43506        __tmp.put_f32_le(self.var_horiz);
43507        __tmp.put_f32_le(self.var_vert);
43508        __tmp.put_f32_le(self.wind_alt);
43509        __tmp.put_f32_le(self.horiz_accuracy);
43510        __tmp.put_f32_le(self.vert_accuracy);
43511        if matches!(version, MavlinkVersion::V2) {
43512            let len = __tmp.len();
43513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
43514        } else {
43515            __tmp.len()
43516        }
43517    }
43518}
43519#[derive(Clone, PartialEq, Debug)]
43520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
43521#[cfg_attr(feature = "serde", serde(tag = "type"))]
43522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
43523#[cfg_attr(feature = "ts", derive(TS))]
43524#[cfg_attr(feature = "ts", ts(export))]
43525#[repr(u32)]
43526pub enum MavMessage {
43527    #[doc = "Set the vehicle attitude and body angular rates."]
43528    #[doc = ""]
43529    #[doc = "ID: 140"]
43530    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
43531    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
43532    #[doc = ""]
43533    #[doc = "ID: 375"]
43534    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
43535    #[doc = "Adaptive Controller tuning information."]
43536    #[doc = ""]
43537    #[doc = "ID: 11010"]
43538    ADAP_TUNING(ADAP_TUNING_DATA),
43539    #[doc = "The location and information of an ADSB vehicle."]
43540    #[doc = ""]
43541    #[doc = "ID: 246"]
43542    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
43543    #[doc = "Status of DCM attitude estimator."]
43544    #[doc = ""]
43545    #[doc = "ID: 163"]
43546    AHRS(AHRS_DATA),
43547    #[doc = "Status of secondary AHRS filter if available."]
43548    #[doc = ""]
43549    #[doc = "ID: 178"]
43550    AHRS2(AHRS2_DATA),
43551    #[doc = "Status of third AHRS filter if available. This is for ANU research group (Ali and Sean)."]
43552    #[doc = ""]
43553    #[doc = "ID: 182"]
43554    AHRS3(AHRS3_DATA),
43555    #[doc = "Authorization package."]
43556    #[doc = ""]
43557    #[doc = "ID: 52000"]
43558    AIRLINK_AUTH(AIRLINK_AUTH_DATA),
43559    #[doc = "Response to the authorization request."]
43560    #[doc = ""]
43561    #[doc = "ID: 52001"]
43562    AIRLINK_AUTH_RESPONSE(AIRLINK_AUTH_RESPONSE_DATA),
43563    #[doc = "Airspeed auto-calibration."]
43564    #[doc = ""]
43565    #[doc = "ID: 174"]
43566    AIRSPEED_AUTOCAL(AIRSPEED_AUTOCAL_DATA),
43567    #[doc = "The location and information of an AIS vessel."]
43568    #[doc = ""]
43569    #[doc = "ID: 301"]
43570    AIS_VESSEL(AIS_VESSEL_DATA),
43571    #[doc = "The current system altitude."]
43572    #[doc = ""]
43573    #[doc = "ID: 141"]
43574    ALTITUDE(ALTITUDE_DATA),
43575    #[doc = "Angle of Attack and Side Slip Angle."]
43576    #[doc = ""]
43577    #[doc = "ID: 11020"]
43578    AOA_SSA(AOA_SSA_DATA),
43579    #[doc = "Raw ADC output."]
43580    #[doc = ""]
43581    #[doc = "ID: 153"]
43582    AP_ADC(AP_ADC_DATA),
43583    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
43584    #[doc = ""]
43585    #[doc = "ID: 30"]
43586    ATTITUDE(ATTITUDE_DATA),
43587    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
43588    #[doc = ""]
43589    #[doc = "ID: 31"]
43590    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
43591    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
43592    #[doc = ""]
43593    #[doc = "ID: 61"]
43594    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
43595    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
43596    #[doc = ""]
43597    #[doc = "ID: 83"]
43598    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
43599    #[doc = "Motion capture attitude and position."]
43600    #[doc = ""]
43601    #[doc = "ID: 138"]
43602    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
43603    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
43604    #[doc = ""]
43605    #[doc = "ID: 7"]
43606    AUTH_KEY(AUTH_KEY_DATA),
43607    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
43608    #[doc = ""]
43609    #[doc = "ID: 286"]
43610    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
43611    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
43612    #[doc = ""]
43613    #[doc = "ID: 148"]
43614    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
43615    #[doc = "Request the autopilot version from the system/component."]
43616    #[doc = ""]
43617    #[doc = "ID: 183"]
43618    AUTOPILOT_VERSION_REQUEST(AUTOPILOT_VERSION_REQUEST_DATA),
43619    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
43620    #[doc = ""]
43621    #[doc = "ID: 435"]
43622    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
43623    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
43624    #[doc = ""]
43625    #[doc = "ID: 437"]
43626    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
43627    #[doc = "2nd Battery status."]
43628    #[doc = ""]
43629    #[doc = "ID: 181"]
43630    #[deprecated = " See `BATTERY_STATUS` (Deprecated since 2017-04)"]
43631    BATTERY2(BATTERY2_DATA),
43632    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
43633    #[doc = ""]
43634    #[doc = "ID: 372"]
43635    BATTERY_INFO(BATTERY_INFO_DATA),
43636    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
43637    #[doc = ""]
43638    #[doc = "ID: 147"]
43639    BATTERY_STATUS(BATTERY_STATUS_DATA),
43640    #[doc = "Report button state change."]
43641    #[doc = ""]
43642    #[doc = "ID: 257"]
43643    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
43644    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
43645    #[doc = ""]
43646    #[doc = "ID: 262"]
43647    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
43648    #[doc = "Camera Capture Feedback."]
43649    #[doc = ""]
43650    #[doc = "ID: 180"]
43651    CAMERA_FEEDBACK(CAMERA_FEEDBACK_DATA),
43652    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
43653    #[doc = ""]
43654    #[doc = "ID: 271"]
43655    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
43656    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
43657    #[doc = ""]
43658    #[doc = "ID: 263"]
43659    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
43660    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
43661    #[doc = ""]
43662    #[doc = "ID: 259"]
43663    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
43664    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
43665    #[doc = ""]
43666    #[doc = "ID: 260"]
43667    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
43668    #[doc = "Camera Event."]
43669    #[doc = ""]
43670    #[doc = "ID: 179"]
43671    CAMERA_STATUS(CAMERA_STATUS_DATA),
43672    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
43673    #[doc = ""]
43674    #[doc = "ID: 277"]
43675    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
43676    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
43677    #[doc = ""]
43678    #[doc = "ID: 276"]
43679    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
43680    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
43681    #[doc = ""]
43682    #[doc = "ID: 275"]
43683    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
43684    #[doc = "Camera-IMU triggering and synchronisation message."]
43685    #[doc = ""]
43686    #[doc = "ID: 112"]
43687    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
43688    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
43689    #[doc = ""]
43690    #[doc = "ID: 387"]
43691    CANFD_FRAME(CANFD_FRAME_DATA),
43692    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
43693    #[doc = ""]
43694    #[doc = "ID: 388"]
43695    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
43696    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
43697    #[doc = ""]
43698    #[doc = "ID: 386"]
43699    CAN_FRAME(CAN_FRAME_DATA),
43700    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
43701    #[doc = ""]
43702    #[doc = "ID: 336"]
43703    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
43704    #[doc = "Report current used cellular network status."]
43705    #[doc = ""]
43706    #[doc = "ID: 334"]
43707    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
43708    #[doc = "Request to control this MAV."]
43709    #[doc = ""]
43710    #[doc = "ID: 5"]
43711    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
43712    #[doc = "Accept / deny control of this MAV."]
43713    #[doc = ""]
43714    #[doc = "ID: 6"]
43715    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
43716    #[doc = "Information about a potential collision."]
43717    #[doc = ""]
43718    #[doc = "ID: 247"]
43719    COLLISION(COLLISION_DATA),
43720    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
43721    #[doc = ""]
43722    #[doc = "ID: 77"]
43723    COMMAND_ACK(COMMAND_ACK_DATA),
43724    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
43725    #[doc = ""]
43726    #[doc = "ID: 80"]
43727    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
43728    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
43729    #[doc = ""]
43730    #[doc = "ID: 75"]
43731    COMMAND_INT(COMMAND_INT_DATA),
43732    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
43733    #[doc = ""]
43734    #[doc = "ID: 76"]
43735    COMMAND_LONG(COMMAND_LONG_DATA),
43736    #[doc = "Status of compassmot calibration."]
43737    #[doc = ""]
43738    #[doc = "ID: 177"]
43739    COMPASSMOT_STATUS(COMPASSMOT_STATUS_DATA),
43740    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
43741    #[doc = ""]
43742    #[doc = "ID: 395"]
43743    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
43744    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
43745    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
43746    #[doc = ""]
43747    #[doc = "ID: 396"]
43748    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
43749    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
43750    #[doc = ""]
43751    #[doc = "ID: 397"]
43752    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
43753    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
43754    #[doc = ""]
43755    #[doc = "ID: 146"]
43756    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
43757    #[doc = "offset response to encapsulated data."]
43758    #[doc = ""]
43759    #[doc = "ID: 50005"]
43760    CUBEPILOT_FIRMWARE_UPDATE_RESP(CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA),
43761    #[doc = "Start firmware update with encapsulated data."]
43762    #[doc = ""]
43763    #[doc = "ID: 50004"]
43764    CUBEPILOT_FIRMWARE_UPDATE_START(CUBEPILOT_FIRMWARE_UPDATE_START_DATA),
43765    #[doc = "Raw RC Data."]
43766    #[doc = ""]
43767    #[doc = "ID: 50001"]
43768    CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA),
43769    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
43770    #[doc = ""]
43771    #[doc = "ID: 411"]
43772    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
43773    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
43774    #[doc = ""]
43775    #[doc = "ID: 436"]
43776    CURRENT_MODE(CURRENT_MODE_DATA),
43777    #[doc = "Data packet, size 16."]
43778    #[doc = ""]
43779    #[doc = "ID: 169"]
43780    DATA16(DATA16_DATA),
43781    #[doc = "Data packet, size 32."]
43782    #[doc = ""]
43783    #[doc = "ID: 170"]
43784    DATA32(DATA32_DATA),
43785    #[doc = "Data packet, size 64."]
43786    #[doc = ""]
43787    #[doc = "ID: 171"]
43788    DATA64(DATA64_DATA),
43789    #[doc = "Data packet, size 96."]
43790    #[doc = ""]
43791    #[doc = "ID: 172"]
43792    DATA96(DATA96_DATA),
43793    #[doc = "Data stream status information."]
43794    #[doc = ""]
43795    #[doc = "ID: 67"]
43796    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
43797    DATA_STREAM(DATA_STREAM_DATA),
43798    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
43799    #[doc = ""]
43800    #[doc = "ID: 130"]
43801    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
43802    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
43803    #[doc = ""]
43804    #[doc = "ID: 254"]
43805    DEBUG(DEBUG_DATA),
43806    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
43807    #[doc = ""]
43808    #[doc = "ID: 350"]
43809    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
43810    #[doc = "To debug something using a named 3D vector."]
43811    #[doc = ""]
43812    #[doc = "ID: 250"]
43813    DEBUG_VECT(DEBUG_VECT_DATA),
43814    #[doc = "Deepstall path planning."]
43815    #[doc = ""]
43816    #[doc = "ID: 195"]
43817    DEEPSTALL(DEEPSTALL_DATA),
43818    #[doc = "Read registers for a device."]
43819    #[doc = ""]
43820    #[doc = "ID: 11000"]
43821    DEVICE_OP_READ(DEVICE_OP_READ_DATA),
43822    #[doc = "Read registers reply."]
43823    #[doc = ""]
43824    #[doc = "ID: 11001"]
43825    DEVICE_OP_READ_REPLY(DEVICE_OP_READ_REPLY_DATA),
43826    #[doc = "Write registers for a device."]
43827    #[doc = ""]
43828    #[doc = "ID: 11002"]
43829    DEVICE_OP_WRITE(DEVICE_OP_WRITE_DATA),
43830    #[doc = "Write registers reply."]
43831    #[doc = ""]
43832    #[doc = "ID: 11003"]
43833    DEVICE_OP_WRITE_REPLY(DEVICE_OP_WRITE_REPLY_DATA),
43834    #[doc = "Configure on-board Camera Control System."]
43835    #[doc = ""]
43836    #[doc = "ID: 154"]
43837    DIGICAM_CONFIGURE(DIGICAM_CONFIGURE_DATA),
43838    #[doc = "Control on-board Camera Control System to take shots."]
43839    #[doc = ""]
43840    #[doc = "ID: 155"]
43841    DIGICAM_CONTROL(DIGICAM_CONTROL_DATA),
43842    #[doc = "Distance sensor information for an onboard rangefinder."]
43843    #[doc = ""]
43844    #[doc = "ID: 132"]
43845    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
43846    #[doc = "EFI status output."]
43847    #[doc = ""]
43848    #[doc = "ID: 225"]
43849    EFI_STATUS(EFI_STATUS_DATA),
43850    #[doc = "EKF Status message including flags and variances."]
43851    #[doc = ""]
43852    #[doc = "ID: 193"]
43853    EKF_STATUS_REPORT(EKF_STATUS_REPORT_DATA),
43854    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
43855    #[doc = ""]
43856    #[doc = "ID: 131"]
43857    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
43858    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
43859    #[doc = ""]
43860    #[doc = "ID: 290"]
43861    ESC_INFO(ESC_INFO_DATA),
43862    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
43863    #[doc = ""]
43864    #[doc = "ID: 291"]
43865    ESC_STATUS(ESC_STATUS_DATA),
43866    #[doc = "ESC Telemetry Data for ESCs 13 to 16, matching data sent by BLHeli ESCs."]
43867    #[doc = ""]
43868    #[doc = "ID: 11040"]
43869    ESC_TELEMETRY_13_TO_16(ESC_TELEMETRY_13_TO_16_DATA),
43870    #[doc = "ESC Telemetry Data for ESCs 17 to 20, matching data sent by BLHeli ESCs."]
43871    #[doc = ""]
43872    #[doc = "ID: 11041"]
43873    ESC_TELEMETRY_17_TO_20(ESC_TELEMETRY_17_TO_20_DATA),
43874    #[doc = "ESC Telemetry Data for ESCs 1 to 4, matching data sent by BLHeli ESCs."]
43875    #[doc = ""]
43876    #[doc = "ID: 11030"]
43877    ESC_TELEMETRY_1_TO_4(ESC_TELEMETRY_1_TO_4_DATA),
43878    #[doc = "ESC Telemetry Data for ESCs 21 to 24, matching data sent by BLHeli ESCs."]
43879    #[doc = ""]
43880    #[doc = "ID: 11042"]
43881    ESC_TELEMETRY_21_TO_24(ESC_TELEMETRY_21_TO_24_DATA),
43882    #[doc = "ESC Telemetry Data for ESCs 25 to 28, matching data sent by BLHeli ESCs."]
43883    #[doc = ""]
43884    #[doc = "ID: 11043"]
43885    ESC_TELEMETRY_25_TO_28(ESC_TELEMETRY_25_TO_28_DATA),
43886    #[doc = "ESC Telemetry Data for ESCs 29 to 32, matching data sent by BLHeli ESCs."]
43887    #[doc = ""]
43888    #[doc = "ID: 11044"]
43889    ESC_TELEMETRY_29_TO_32(ESC_TELEMETRY_29_TO_32_DATA),
43890    #[doc = "ESC Telemetry Data for ESCs 5 to 8, matching data sent by BLHeli ESCs."]
43891    #[doc = ""]
43892    #[doc = "ID: 11031"]
43893    ESC_TELEMETRY_5_TO_8(ESC_TELEMETRY_5_TO_8_DATA),
43894    #[doc = "ESC Telemetry Data for ESCs 9 to 12, matching data sent by BLHeli ESCs."]
43895    #[doc = ""]
43896    #[doc = "ID: 11032"]
43897    ESC_TELEMETRY_9_TO_12(ESC_TELEMETRY_9_TO_12_DATA),
43898    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
43899    #[doc = ""]
43900    #[doc = "ID: 230"]
43901    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
43902    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
43903    #[doc = ""]
43904    #[doc = "ID: 410"]
43905    EVENT(EVENT_DATA),
43906    #[doc = "Provides state for additional features."]
43907    #[doc = ""]
43908    #[doc = "ID: 245"]
43909    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
43910    #[doc = "Request a current fence point from MAV."]
43911    #[doc = ""]
43912    #[doc = "ID: 161"]
43913    FENCE_FETCH_POINT(FENCE_FETCH_POINT_DATA),
43914    #[doc = "GCS."]
43915    #[doc = ""]
43916    #[doc = "ID: 160"]
43917    FENCE_POINT(FENCE_POINT_DATA),
43918    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
43919    #[doc = ""]
43920    #[doc = "ID: 162"]
43921    FENCE_STATUS(FENCE_STATUS_DATA),
43922    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
43923    #[doc = ""]
43924    #[doc = "ID: 110"]
43925    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
43926    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
43927    #[doc = ""]
43928    #[doc = "ID: 264"]
43929    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
43930    #[doc = "Current motion information from a designated system."]
43931    #[doc = ""]
43932    #[doc = "ID: 144"]
43933    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
43934    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
43935    #[doc = ""]
43936    #[doc = "ID: 371"]
43937    FUEL_STATUS(FUEL_STATUS_DATA),
43938    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
43939    #[doc = ""]
43940    #[doc = "ID: 373"]
43941    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
43942    #[doc = "Control message for rate gimbal."]
43943    #[doc = ""]
43944    #[doc = "ID: 201"]
43945    GIMBAL_CONTROL(GIMBAL_CONTROL_DATA),
43946    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
43947    #[doc = ""]
43948    #[doc = "ID: 285"]
43949    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
43950    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
43951    #[doc = ""]
43952    #[doc = "ID: 283"]
43953    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
43954    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
43955    #[doc = ""]
43956    #[doc = "ID: 284"]
43957    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
43958    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
43959    #[doc = ""]
43960    #[doc = "ID: 280"]
43961    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
43962    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
43963    #[doc = ""]
43964    #[doc = "ID: 282"]
43965    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
43966    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
43967    #[doc = ""]
43968    #[doc = "ID: 288"]
43969    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
43970    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
43971    #[doc = ""]
43972    #[doc = "ID: 287"]
43973    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
43974    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
43975    #[doc = ""]
43976    #[doc = "ID: 281"]
43977    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
43978    #[doc = "3 axis gimbal measurements."]
43979    #[doc = ""]
43980    #[doc = "ID: 200"]
43981    GIMBAL_REPORT(GIMBAL_REPORT_DATA),
43982    #[doc = "100 Hz gimbal torque command telemetry."]
43983    #[doc = ""]
43984    #[doc = "ID: 214"]
43985    GIMBAL_TORQUE_CMD_REPORT(GIMBAL_TORQUE_CMD_REPORT_DATA),
43986    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
43987    #[doc = ""]
43988    #[doc = "ID: 33"]
43989    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
43990    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
43991    #[doc = ""]
43992    #[doc = "ID: 63"]
43993    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
43994    #[doc = "Global position/attitude estimate from a vision source."]
43995    #[doc = ""]
43996    #[doc = "ID: 101"]
43997    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
43998    #[doc = "Request a GOPRO_COMMAND response from the GoPro."]
43999    #[doc = ""]
44000    #[doc = "ID: 216"]
44001    GOPRO_GET_REQUEST(GOPRO_GET_REQUEST_DATA),
44002    #[doc = "Response from a GOPRO_COMMAND get request."]
44003    #[doc = ""]
44004    #[doc = "ID: 217"]
44005    GOPRO_GET_RESPONSE(GOPRO_GET_RESPONSE_DATA),
44006    #[doc = "Heartbeat from a HeroBus attached GoPro."]
44007    #[doc = ""]
44008    #[doc = "ID: 215"]
44009    GOPRO_HEARTBEAT(GOPRO_HEARTBEAT_DATA),
44010    #[doc = "Request to set a GOPRO_COMMAND with a desired."]
44011    #[doc = ""]
44012    #[doc = "ID: 218"]
44013    GOPRO_SET_REQUEST(GOPRO_SET_REQUEST_DATA),
44014    #[doc = "Response from a GOPRO_COMMAND set request."]
44015    #[doc = ""]
44016    #[doc = "ID: 219"]
44017    GOPRO_SET_RESPONSE(GOPRO_SET_RESPONSE_DATA),
44018    #[doc = "Second GPS data."]
44019    #[doc = ""]
44020    #[doc = "ID: 124"]
44021    GPS2_RAW(GPS2_RAW_DATA),
44022    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
44023    #[doc = ""]
44024    #[doc = "ID: 128"]
44025    GPS2_RTK(GPS2_RTK_DATA),
44026    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
44027    #[doc = ""]
44028    #[doc = "ID: 49"]
44029    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
44030    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
44031    #[doc = ""]
44032    #[doc = "ID: 123"]
44033    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
44034    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
44035    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
44036    #[doc = ""]
44037    #[doc = "ID: 232"]
44038    GPS_INPUT(GPS_INPUT_DATA),
44039    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
44040    #[doc = ""]
44041    #[doc = "ID: 24"]
44042    GPS_RAW_INT(GPS_RAW_INT_DATA),
44043    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
44044    #[doc = ""]
44045    #[doc = "ID: 233"]
44046    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
44047    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
44048    #[doc = ""]
44049    #[doc = "ID: 127"]
44050    GPS_RTK(GPS_RTK_DATA),
44051    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
44052    #[doc = ""]
44053    #[doc = "ID: 25"]
44054    GPS_STATUS(GPS_STATUS_DATA),
44055    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
44056    #[doc = ""]
44057    #[doc = "ID: 0"]
44058    HEARTBEAT(HEARTBEAT_DATA),
44059    #[doc = "Herelink Telemetry."]
44060    #[doc = ""]
44061    #[doc = "ID: 50003"]
44062    HERELINK_TELEM(HERELINK_TELEM_DATA),
44063    #[doc = "Information about video stream."]
44064    #[doc = ""]
44065    #[doc = "ID: 50002"]
44066    HERELINK_VIDEO_STREAM_INFORMATION(HERELINK_VIDEO_STREAM_INFORMATION_DATA),
44067    #[doc = "The IMU readings in SI units in NED body frame."]
44068    #[doc = ""]
44069    #[doc = "ID: 105"]
44070    HIGHRES_IMU(HIGHRES_IMU_DATA),
44071    #[doc = "Message appropriate for high latency connections like Iridium."]
44072    #[doc = ""]
44073    #[doc = "ID: 234"]
44074    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
44075    HIGH_LATENCY(HIGH_LATENCY_DATA),
44076    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
44077    #[doc = ""]
44078    #[doc = "ID: 235"]
44079    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
44080    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
44081    #[doc = ""]
44082    #[doc = "ID: 93"]
44083    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
44084    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
44085    #[doc = ""]
44086    #[doc = "ID: 91"]
44087    HIL_CONTROLS(HIL_CONTROLS_DATA),
44088    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
44089    #[doc = ""]
44090    #[doc = "ID: 113"]
44091    HIL_GPS(HIL_GPS_DATA),
44092    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
44093    #[doc = ""]
44094    #[doc = "ID: 114"]
44095    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
44096    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
44097    #[doc = ""]
44098    #[doc = "ID: 92"]
44099    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
44100    #[doc = "The IMU readings in SI units in NED body frame."]
44101    #[doc = ""]
44102    #[doc = "ID: 107"]
44103    HIL_SENSOR(HIL_SENSOR_DATA),
44104    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
44105    #[doc = ""]
44106    #[doc = "ID: 90"]
44107    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
44108    HIL_STATE(HIL_STATE_DATA),
44109    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
44110    #[doc = ""]
44111    #[doc = "ID: 115"]
44112    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
44113    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
44114    #[doc = ""]
44115    #[doc = "ID: 242"]
44116    HOME_POSITION(HOME_POSITION_DATA),
44117    #[doc = "Status of key hardware."]
44118    #[doc = ""]
44119    #[doc = "ID: 165"]
44120    HWSTATUS(HWSTATUS_DATA),
44121    #[doc = "Temperature and humidity from hygrometer."]
44122    #[doc = ""]
44123    #[doc = "ID: 12920"]
44124    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
44125    #[doc = "ICAROUS heartbeat."]
44126    #[doc = ""]
44127    #[doc = "ID: 42000"]
44128    ICAROUS_HEARTBEAT(ICAROUS_HEARTBEAT_DATA),
44129    #[doc = "Kinematic multi bands (track) output from Daidalus."]
44130    #[doc = ""]
44131    #[doc = "ID: 42001"]
44132    ICAROUS_KINEMATIC_BANDS(ICAROUS_KINEMATIC_BANDS_DATA),
44133    #[doc = "Illuminator status."]
44134    #[doc = ""]
44135    #[doc = "ID: 440"]
44136    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
44137    #[doc = "Status of the Iridium SBD link."]
44138    #[doc = ""]
44139    #[doc = "ID: 335"]
44140    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
44141    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
44142    #[doc = ""]
44143    #[doc = "ID: 149"]
44144    LANDING_TARGET(LANDING_TARGET_DATA),
44145    #[doc = "Control vehicle LEDs."]
44146    #[doc = ""]
44147    #[doc = "ID: 186"]
44148    LED_CONTROL(LED_CONTROL_DATA),
44149    #[doc = "Status of AP_Limits. Sent in extended status stream when AP_Limits is enabled."]
44150    #[doc = ""]
44151    #[doc = "ID: 167"]
44152    LIMITS_STATUS(LIMITS_STATUS_DATA),
44153    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
44154    #[doc = ""]
44155    #[doc = "ID: 8"]
44156    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
44157    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
44158    #[doc = ""]
44159    #[doc = "ID: 32"]
44160    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
44161    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
44162    #[doc = ""]
44163    #[doc = "ID: 64"]
44164    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
44165    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
44166    #[doc = ""]
44167    #[doc = "ID: 89"]
44168    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
44169    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
44170    #[doc = ""]
44171    #[doc = "ID: 268"]
44172    LOGGING_ACK(LOGGING_ACK_DATA),
44173    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
44174    #[doc = ""]
44175    #[doc = "ID: 266"]
44176    LOGGING_DATA(LOGGING_DATA_DATA),
44177    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
44178    #[doc = ""]
44179    #[doc = "ID: 267"]
44180    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
44181    #[doc = "Reply to LOG_REQUEST_DATA."]
44182    #[doc = ""]
44183    #[doc = "ID: 120"]
44184    LOG_DATA(LOG_DATA_DATA),
44185    #[doc = "Reply to LOG_REQUEST_LIST."]
44186    #[doc = ""]
44187    #[doc = "ID: 118"]
44188    LOG_ENTRY(LOG_ENTRY_DATA),
44189    #[doc = "Erase all logs."]
44190    #[doc = ""]
44191    #[doc = "ID: 121"]
44192    LOG_ERASE(LOG_ERASE_DATA),
44193    #[doc = "Request a chunk of a log."]
44194    #[doc = ""]
44195    #[doc = "ID: 119"]
44196    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
44197    #[doc = "Stop log transfer and resume normal logging."]
44198    #[doc = ""]
44199    #[doc = "ID: 122"]
44200    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
44201    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
44202    #[doc = ""]
44203    #[doc = "ID: 117"]
44204    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
44205    #[doc = "Composite EFI and Governor data from Loweheiser equipment.  This message is created by the EFI unit based on its own data and data received from a governor attached to that EFI unit."]
44206    #[doc = ""]
44207    #[doc = "ID: 10151"]
44208    LOWEHEISER_GOV_EFI(LOWEHEISER_GOV_EFI_DATA),
44209    #[doc = "Reports progress of compass calibration."]
44210    #[doc = ""]
44211    #[doc = "ID: 191"]
44212    MAG_CAL_PROGRESS(MAG_CAL_PROGRESS_DATA),
44213    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
44214    #[doc = ""]
44215    #[doc = "ID: 192"]
44216    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
44217    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
44218    #[doc = ""]
44219    #[doc = "ID: 69"]
44220    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
44221    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
44222    #[doc = ""]
44223    #[doc = "ID: 81"]
44224    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
44225    #[doc = "The MCU status, giving MCU temperature and voltage. The min and max voltages are to allow for detecting power supply instability."]
44226    #[doc = ""]
44227    #[doc = "ID: 11039"]
44228    MCU_STATUS(MCU_STATUS_DATA),
44229    #[doc = "State of autopilot RAM."]
44230    #[doc = ""]
44231    #[doc = "ID: 152"]
44232    MEMINFO(MEMINFO_DATA),
44233    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
44234    #[doc = ""]
44235    #[doc = "ID: 249"]
44236    MEMORY_VECT(MEMORY_VECT_DATA),
44237    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
44238    #[doc = ""]
44239    #[doc = "ID: 244"]
44240    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
44241    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
44242    #[doc = ""]
44243    #[doc = "ID: 47"]
44244    MISSION_ACK(MISSION_ACK_DATA),
44245    #[doc = "Delete all mission items at once."]
44246    #[doc = ""]
44247    #[doc = "ID: 45"]
44248    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
44249    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
44250    #[doc = ""]
44251    #[doc = "ID: 44"]
44252    MISSION_COUNT(MISSION_COUNT_DATA),
44253    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
44254    #[doc = ""]
44255    #[doc = "ID: 42"]
44256    MISSION_CURRENT(MISSION_CURRENT_DATA),
44257    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
44258    #[doc = ""]
44259    #[doc = "ID: 39"]
44260    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
44261    MISSION_ITEM(MISSION_ITEM_DATA),
44262    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
44263    #[doc = ""]
44264    #[doc = "ID: 73"]
44265    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
44266    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
44267    #[doc = ""]
44268    #[doc = "ID: 46"]
44269    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
44270    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
44271    #[doc = ""]
44272    #[doc = "ID: 40"]
44273    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
44274    MISSION_REQUEST(MISSION_REQUEST_DATA),
44275    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
44276    #[doc = ""]
44277    #[doc = "ID: 51"]
44278    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
44279    #[doc = "Request the overall list of mission items from the system/component."]
44280    #[doc = ""]
44281    #[doc = "ID: 43"]
44282    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
44283    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
44284    #[doc = ""]
44285    #[doc = "ID: 37"]
44286    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
44287    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
44288    #[doc = ""]
44289    #[doc = "ID: 41"]
44290    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
44291    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
44292    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
44293    #[doc = ""]
44294    #[doc = "ID: 38"]
44295    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
44296    #[doc = "Message to configure a camera mount, directional antenna, etc."]
44297    #[doc = ""]
44298    #[doc = "ID: 156"]
44299    MOUNT_CONFIGURE(MOUNT_CONFIGURE_DATA),
44300    #[doc = "Message to control a camera mount, directional antenna, etc."]
44301    #[doc = ""]
44302    #[doc = "ID: 157"]
44303    MOUNT_CONTROL(MOUNT_CONTROL_DATA),
44304    #[doc = "Orientation of a mount."]
44305    #[doc = ""]
44306    #[doc = "ID: 265"]
44307    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
44308    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
44309    #[doc = "Message with some status from autopilot to GCS about camera or antenna mount."]
44310    #[doc = ""]
44311    #[doc = "ID: 158"]
44312    MOUNT_STATUS(MOUNT_STATUS_DATA),
44313    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
44314    #[doc = ""]
44315    #[doc = "ID: 251"]
44316    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
44317    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
44318    #[doc = ""]
44319    #[doc = "ID: 252"]
44320    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
44321    #[doc = "The state of the navigation and position controller."]
44322    #[doc = ""]
44323    #[doc = "ID: 62"]
44324    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
44325    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
44326    #[doc = ""]
44327    #[doc = "ID: 330"]
44328    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
44329    #[doc = "Obstacle located as a 3D vector."]
44330    #[doc = ""]
44331    #[doc = "ID: 11037"]
44332    OBSTACLE_DISTANCE_3D(OBSTACLE_DISTANCE_3D_DATA),
44333    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
44334    #[doc = ""]
44335    #[doc = "ID: 331"]
44336    ODOMETRY(ODOMETRY_DATA),
44337    #[doc = "Hardware status sent by an onboard computer."]
44338    #[doc = ""]
44339    #[doc = "ID: 390"]
44340    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
44341    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
44342    #[doc = ""]
44343    #[doc = "ID: 12918"]
44344    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
44345    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
44346    #[doc = ""]
44347    #[doc = "ID: 12902"]
44348    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
44349    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
44350    #[doc = ""]
44351    #[doc = "ID: 12900"]
44352    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
44353    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
44354    #[doc = ""]
44355    #[doc = "ID: 12901"]
44356    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
44357    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
44358    #[doc = ""]
44359    #[doc = "ID: 12915"]
44360    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
44361    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
44362    #[doc = ""]
44363    #[doc = "ID: 12905"]
44364    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
44365    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
44366    #[doc = ""]
44367    #[doc = "ID: 12903"]
44368    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
44369    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
44370    #[doc = ""]
44371    #[doc = "ID: 12904"]
44372    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
44373    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
44374    #[doc = ""]
44375    #[doc = "ID: 12919"]
44376    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
44377    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
44378    #[doc = ""]
44379    #[doc = "ID: 100"]
44380    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
44381    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
44382    #[doc = ""]
44383    #[doc = "ID: 106"]
44384    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
44385    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
44386    #[doc = ""]
44387    #[doc = "ID: 360"]
44388    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
44389    #[doc = "Configure an OSD parameter slot."]
44390    #[doc = ""]
44391    #[doc = "ID: 11033"]
44392    OSD_PARAM_CONFIG(OSD_PARAM_CONFIG_DATA),
44393    #[doc = "Configure OSD parameter reply."]
44394    #[doc = ""]
44395    #[doc = "ID: 11034"]
44396    OSD_PARAM_CONFIG_REPLY(OSD_PARAM_CONFIG_REPLY_DATA),
44397    #[doc = "Read a configured an OSD parameter slot."]
44398    #[doc = ""]
44399    #[doc = "ID: 11035"]
44400    OSD_PARAM_SHOW_CONFIG(OSD_PARAM_SHOW_CONFIG_DATA),
44401    #[doc = "Read configured OSD parameter reply."]
44402    #[doc = ""]
44403    #[doc = "ID: 11036"]
44404    OSD_PARAM_SHOW_CONFIG_REPLY(OSD_PARAM_SHOW_CONFIG_REPLY_DATA),
44405    #[doc = "Response from a PARAM_EXT_SET message."]
44406    #[doc = ""]
44407    #[doc = "ID: 324"]
44408    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
44409    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
44410    #[doc = ""]
44411    #[doc = "ID: 321"]
44412    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
44413    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
44414    #[doc = ""]
44415    #[doc = "ID: 320"]
44416    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
44417    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
44418    #[doc = ""]
44419    #[doc = "ID: 323"]
44420    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
44421    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
44422    #[doc = ""]
44423    #[doc = "ID: 322"]
44424    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
44425    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
44426    #[doc = ""]
44427    #[doc = "ID: 50"]
44428    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
44429    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
44430    #[doc = ""]
44431    #[doc = "ID: 21"]
44432    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
44433    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
44434    #[doc = ""]
44435    #[doc = "ID: 20"]
44436    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
44437    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
44438    #[doc = ""]
44439    #[doc = "ID: 23"]
44440    PARAM_SET(PARAM_SET_DATA),
44441    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
44442    #[doc = ""]
44443    #[doc = "ID: 22"]
44444    PARAM_VALUE(PARAM_VALUE_DATA),
44445    #[doc = "PID tuning information."]
44446    #[doc = ""]
44447    #[doc = "ID: 194"]
44448    PID_TUNING(PID_TUNING_DATA),
44449    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
44450    #[doc = ""]
44451    #[doc = "ID: 4"]
44452    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
44453    PING(PING_DATA),
44454    #[doc = "Control vehicle tone generation (buzzer)."]
44455    #[doc = ""]
44456    #[doc = "ID: 258"]
44457    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
44458    PLAY_TUNE(PLAY_TUNE_DATA),
44459    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
44460    #[doc = ""]
44461    #[doc = "ID: 400"]
44462    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
44463    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
44464    #[doc = ""]
44465    #[doc = "ID: 87"]
44466    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
44467    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
44468    #[doc = ""]
44469    #[doc = "ID: 85"]
44470    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
44471    #[doc = "Power supply status."]
44472    #[doc = ""]
44473    #[doc = "ID: 125"]
44474    POWER_STATUS(POWER_STATUS_DATA),
44475    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
44476    #[doc = ""]
44477    #[doc = "ID: 300"]
44478    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
44479    #[doc = "Status generated by radio."]
44480    #[doc = ""]
44481    #[doc = "ID: 166"]
44482    RADIO(RADIO_DATA),
44483    #[doc = "Status generated by radio and injected into MAVLink stream."]
44484    #[doc = ""]
44485    #[doc = "ID: 109"]
44486    RADIO_STATUS(RADIO_STATUS_DATA),
44487    #[doc = "Request a current rally point from MAV. MAV should respond with a RALLY_POINT message. MAV should not respond if the request is invalid."]
44488    #[doc = ""]
44489    #[doc = "ID: 176"]
44490    RALLY_FETCH_POINT(RALLY_FETCH_POINT_DATA),
44491    #[doc = "GCS."]
44492    #[doc = ""]
44493    #[doc = "ID: 175"]
44494    RALLY_POINT(RALLY_POINT_DATA),
44495    #[doc = "Rangefinder reporting."]
44496    #[doc = ""]
44497    #[doc = "ID: 173"]
44498    RANGEFINDER(RANGEFINDER_DATA),
44499    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
44500    #[doc = ""]
44501    #[doc = "ID: 27"]
44502    RAW_IMU(RAW_IMU_DATA),
44503    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
44504    #[doc = ""]
44505    #[doc = "ID: 28"]
44506    RAW_PRESSURE(RAW_PRESSURE_DATA),
44507    #[doc = "RPM sensor data message."]
44508    #[doc = ""]
44509    #[doc = "ID: 339"]
44510    RAW_RPM(RAW_RPM_DATA),
44511    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
44512    #[doc = ""]
44513    #[doc = "ID: 65"]
44514    RC_CHANNELS(RC_CHANNELS_DATA),
44515    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
44516    #[doc = ""]
44517    #[doc = "ID: 70"]
44518    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
44519    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
44520    #[doc = ""]
44521    #[doc = "ID: 35"]
44522    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
44523    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
44524    #[doc = ""]
44525    #[doc = "ID: 34"]
44526    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
44527    #[doc = "Send Status of each log block that autopilot board might have sent."]
44528    #[doc = ""]
44529    #[doc = "ID: 185"]
44530    REMOTE_LOG_BLOCK_STATUS(REMOTE_LOG_BLOCK_STATUS_DATA),
44531    #[doc = "Send a block of log data to remote location."]
44532    #[doc = ""]
44533    #[doc = "ID: 184"]
44534    REMOTE_LOG_DATA_BLOCK(REMOTE_LOG_DATA_BLOCK_DATA),
44535    #[doc = "Request a data stream."]
44536    #[doc = ""]
44537    #[doc = "ID: 66"]
44538    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
44539    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
44540    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
44541    #[doc = ""]
44542    #[doc = "ID: 412"]
44543    REQUEST_EVENT(REQUEST_EVENT_DATA),
44544    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
44545    #[doc = ""]
44546    #[doc = "ID: 142"]
44547    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
44548    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
44549    #[doc = ""]
44550    #[doc = "ID: 413"]
44551    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
44552    #[doc = "RPM sensor output."]
44553    #[doc = ""]
44554    #[doc = "ID: 226"]
44555    RPM(RPM_DATA),
44556    #[doc = "Read out the safety zone the MAV currently assumes."]
44557    #[doc = ""]
44558    #[doc = "ID: 55"]
44559    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
44560    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
44561    #[doc = ""]
44562    #[doc = "ID: 54"]
44563    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
44564    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
44565    #[doc = ""]
44566    #[doc = "ID: 26"]
44567    SCALED_IMU(SCALED_IMU_DATA),
44568    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
44569    #[doc = ""]
44570    #[doc = "ID: 116"]
44571    SCALED_IMU2(SCALED_IMU2_DATA),
44572    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
44573    #[doc = ""]
44574    #[doc = "ID: 129"]
44575    SCALED_IMU3(SCALED_IMU3_DATA),
44576    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
44577    #[doc = ""]
44578    #[doc = "ID: 29"]
44579    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
44580    #[doc = "Barometer readings for 2nd barometer."]
44581    #[doc = ""]
44582    #[doc = "ID: 137"]
44583    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
44584    #[doc = "Barometer readings for 3rd barometer."]
44585    #[doc = ""]
44586    #[doc = "ID: 143"]
44587    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
44588    #[doc = "Send a secure command. Data should be signed with a private key corresponding with a public key known to the recipient. Signature should be over the concatenation of the sequence number (little-endian format), the operation (little-endian format) the data and the session key. For SECURE_COMMAND_GET_SESSION_KEY the session key should be zero length. The data array consists of the data followed by the signature. The sum of the data_length and the sig_length cannot be more than 220. The format of the data is command specific."]
44589    #[doc = ""]
44590    #[doc = "ID: 11004"]
44591    SECURE_COMMAND(SECURE_COMMAND_DATA),
44592    #[doc = "Reply from secure command."]
44593    #[doc = ""]
44594    #[doc = "ID: 11005"]
44595    SECURE_COMMAND_REPLY(SECURE_COMMAND_REPLY_DATA),
44596    #[doc = "Offsets and calibrations values for hardware sensors. This makes it easier to debug the calibration process."]
44597    #[doc = ""]
44598    #[doc = "ID: 150"]
44599    #[deprecated = " See `MAG_CAL_REPORT, Accel Parameters, and Gyro Parameters` (Deprecated since 2022-02)"]
44600    SENSOR_OFFSETS(SENSOR_OFFSETS_DATA),
44601    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
44602    #[doc = ""]
44603    #[doc = "ID: 126"]
44604    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
44605    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
44606    #[doc = ""]
44607    #[doc = "ID: 36"]
44608    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
44609    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
44610    #[doc = ""]
44611    #[doc = "ID: 256"]
44612    SETUP_SIGNING(SETUP_SIGNING_DATA),
44613    #[doc = "Set the vehicle attitude and body angular rates."]
44614    #[doc = ""]
44615    #[doc = "ID: 139"]
44616    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
44617    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
44618    #[doc = ""]
44619    #[doc = "ID: 82"]
44620    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
44621    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
44622    #[doc = ""]
44623    #[doc = "ID: 48"]
44624    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
44625    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
44626    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
44627    #[doc = ""]
44628    #[doc = "ID: 243"]
44629    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
44630    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
44631    #[doc = "Set the magnetometer offsets."]
44632    #[doc = ""]
44633    #[doc = "ID: 151"]
44634    #[deprecated = " See `MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS` (Deprecated since 2014-07)"]
44635    SET_MAG_OFFSETS(SET_MAG_OFFSETS_DATA),
44636    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
44637    #[doc = ""]
44638    #[doc = "ID: 11"]
44639    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
44640    SET_MODE(SET_MODE_DATA),
44641    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
44642    #[doc = ""]
44643    #[doc = "ID: 86"]
44644    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
44645    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
44646    #[doc = ""]
44647    #[doc = "ID: 84"]
44648    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
44649    #[doc = "Status of simulation environment, if used."]
44650    #[doc = ""]
44651    #[doc = "ID: 164"]
44652    SIMSTATE(SIMSTATE_DATA),
44653    #[doc = "Status of simulation environment, if used."]
44654    #[doc = ""]
44655    #[doc = "ID: 108"]
44656    SIM_STATE(SIM_STATE_DATA),
44657    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
44658    #[doc = ""]
44659    #[doc = "ID: 370"]
44660    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
44661    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
44662    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
44663    #[doc = ""]
44664    #[doc = "ID: 253"]
44665    STATUSTEXT(STATUSTEXT_DATA),
44666    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
44667    #[doc = ""]
44668    #[doc = "ID: 261"]
44669    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
44670    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
44671    #[doc = ""]
44672    #[doc = "ID: 401"]
44673    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
44674    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
44675    #[doc = ""]
44676    #[doc = "ID: 2"]
44677    SYSTEM_TIME(SYSTEM_TIME_DATA),
44678    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
44679    #[doc = ""]
44680    #[doc = "ID: 1"]
44681    SYS_STATUS(SYS_STATUS_DATA),
44682    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
44683    #[doc = ""]
44684    #[doc = "ID: 135"]
44685    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
44686    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
44687    #[doc = ""]
44688    #[doc = "ID: 134"]
44689    TERRAIN_DATA(TERRAIN_DATA_DATA),
44690    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
44691    #[doc = ""]
44692    #[doc = "ID: 136"]
44693    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
44694    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
44695    #[doc = ""]
44696    #[doc = "ID: 133"]
44697    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
44698    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
44699    #[doc = ""]
44700    #[doc = "ID: 111"]
44701    TIMESYNC(TIMESYNC_DATA),
44702    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
44703    #[doc = ""]
44704    #[doc = "ID: 380"]
44705    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
44706    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
44707    #[doc = ""]
44708    #[doc = "ID: 333"]
44709    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
44710    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
44711    #[doc = ""]
44712    #[doc = "ID: 332"]
44713    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
44714    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
44715    #[doc = ""]
44716    #[doc = "ID: 385"]
44717    TUNNEL(TUNNEL_DATA),
44718    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
44719    #[doc = ""]
44720    #[doc = "ID: 311"]
44721    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
44722    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
44723    #[doc = ""]
44724    #[doc = "ID: 310"]
44725    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
44726    #[doc = "Request messages."]
44727    #[doc = ""]
44728    #[doc = "ID: 10006"]
44729    UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA),
44730    #[doc = "Static data to configure the ADS-B transponder (send within 10 sec of a POR and every 10 sec thereafter)."]
44731    #[doc = ""]
44732    #[doc = "ID: 10001"]
44733    UAVIONIX_ADSB_OUT_CFG(UAVIONIX_ADSB_OUT_CFG_DATA),
44734    #[doc = "Flight Identification for ADSB-Out vehicles."]
44735    #[doc = ""]
44736    #[doc = "ID: 10005"]
44737    UAVIONIX_ADSB_OUT_CFG_FLIGHTID(UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA),
44738    #[doc = "Aircraft Registration."]
44739    #[doc = ""]
44740    #[doc = "ID: 10004"]
44741    UAVIONIX_ADSB_OUT_CFG_REGISTRATION(UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA),
44742    #[doc = "Control message with all data sent in UCP control message."]
44743    #[doc = ""]
44744    #[doc = "ID: 10007"]
44745    UAVIONIX_ADSB_OUT_CONTROL(UAVIONIX_ADSB_OUT_CONTROL_DATA),
44746    #[doc = "Dynamic data used to generate ADS-B out transponder data (send at 5Hz)."]
44747    #[doc = ""]
44748    #[doc = "ID: 10002"]
44749    UAVIONIX_ADSB_OUT_DYNAMIC(UAVIONIX_ADSB_OUT_DYNAMIC_DATA),
44750    #[doc = "Status message with information from UCP Heartbeat and Status messages."]
44751    #[doc = ""]
44752    #[doc = "ID: 10008"]
44753    UAVIONIX_ADSB_OUT_STATUS(UAVIONIX_ADSB_OUT_STATUS_DATA),
44754    #[doc = "Transceiver heartbeat with health report (updated every 10s)."]
44755    #[doc = ""]
44756    #[doc = "ID: 10003"]
44757    UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA),
44758    #[doc = "The global position resulting from GPS and sensor fusion."]
44759    #[doc = ""]
44760    #[doc = "ID: 340"]
44761    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
44762    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
44763    #[doc = ""]
44764    #[doc = "ID: 248"]
44765    V2_EXTENSION(V2_EXTENSION_DATA),
44766    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
44767    #[doc = ""]
44768    #[doc = "ID: 74"]
44769    VFR_HUD(VFR_HUD_DATA),
44770    #[doc = "Vibration levels and accelerometer clipping."]
44771    #[doc = ""]
44772    #[doc = "ID: 241"]
44773    VIBRATION(VIBRATION_DATA),
44774    #[doc = "Global position estimate from a Vicon motion system source."]
44775    #[doc = ""]
44776    #[doc = "ID: 104"]
44777    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
44778    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
44779    #[doc = ""]
44780    #[doc = "ID: 269"]
44781    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
44782    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
44783    #[doc = ""]
44784    #[doc = "ID: 270"]
44785    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
44786    #[doc = "Camera vision based attitude and position deltas."]
44787    #[doc = ""]
44788    #[doc = "ID: 11011"]
44789    VISION_POSITION_DELTA(VISION_POSITION_DELTA_DATA),
44790    #[doc = "Local position/attitude estimate from a vision source."]
44791    #[doc = ""]
44792    #[doc = "ID: 102"]
44793    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
44794    #[doc = "Speed estimate from a vision source."]
44795    #[doc = ""]
44796    #[doc = "ID: 103"]
44797    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
44798    #[doc = "Water depth."]
44799    #[doc = ""]
44800    #[doc = "ID: 11038"]
44801    WATER_DEPTH(WATER_DEPTH_DATA),
44802    #[doc = "Cumulative distance traveled for each reported wheel."]
44803    #[doc = ""]
44804    #[doc = "ID: 9000"]
44805    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
44806    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
44807    #[doc = ""]
44808    #[doc = "ID: 299"]
44809    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
44810    #[doc = "Winch status."]
44811    #[doc = ""]
44812    #[doc = "ID: 9005"]
44813    WINCH_STATUS(WINCH_STATUS_DATA),
44814    #[doc = "Wind estimation."]
44815    #[doc = ""]
44816    #[doc = "ID: 168"]
44817    WIND(WIND_DATA),
44818    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
44819    #[doc = ""]
44820    #[doc = "ID: 231"]
44821    WIND_COV(WIND_COV_DATA),
44822}
44823impl MavMessage {
44824    pub const fn all_ids() -> &'static [u32] {
44825        &[
44826            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
44827            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
44828            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
44829            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
44830            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
44831            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
44832            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
44833            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
44834            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
44835            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
44836            148u32, 149u32, 150u32, 151u32, 152u32, 153u32, 154u32, 155u32, 156u32, 157u32, 158u32,
44837            160u32, 161u32, 162u32, 163u32, 164u32, 165u32, 166u32, 167u32, 168u32, 169u32, 170u32,
44838            171u32, 172u32, 173u32, 174u32, 175u32, 176u32, 177u32, 178u32, 179u32, 180u32, 181u32,
44839            182u32, 183u32, 184u32, 185u32, 186u32, 191u32, 192u32, 193u32, 194u32, 195u32, 200u32,
44840            201u32, 214u32, 215u32, 216u32, 217u32, 218u32, 219u32, 225u32, 226u32, 230u32, 231u32,
44841            232u32, 233u32, 234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32,
44842            248u32, 249u32, 250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32,
44843            260u32, 261u32, 262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32,
44844            271u32, 275u32, 276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32,
44845            287u32, 288u32, 290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32,
44846            322u32, 323u32, 324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32,
44847            340u32, 350u32, 360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32,
44848            387u32, 388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32,
44849            413u32, 435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 10001u32, 10002u32, 10003u32,
44850            10004u32, 10005u32, 10006u32, 10007u32, 10008u32, 10151u32, 11000u32, 11001u32,
44851            11002u32, 11003u32, 11004u32, 11005u32, 11010u32, 11011u32, 11020u32, 11030u32,
44852            11031u32, 11032u32, 11033u32, 11034u32, 11035u32, 11036u32, 11037u32, 11038u32,
44853            11039u32, 11040u32, 11041u32, 11042u32, 11043u32, 11044u32, 12900u32, 12901u32,
44854            12902u32, 12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
44855            42000u32, 42001u32, 50001u32, 50002u32, 50003u32, 50004u32, 50005u32, 52000u32,
44856            52001u32,
44857        ]
44858    }
44859    pub const fn all_messages() -> &'static [(&'static str, u32)] {
44860        &[
44861            (HEARTBEAT_DATA::NAME, HEARTBEAT_DATA::ID),
44862            (SYS_STATUS_DATA::NAME, SYS_STATUS_DATA::ID),
44863            (SYSTEM_TIME_DATA::NAME, SYSTEM_TIME_DATA::ID),
44864            (PING_DATA::NAME, PING_DATA::ID),
44865            (
44866                CHANGE_OPERATOR_CONTROL_DATA::NAME,
44867                CHANGE_OPERATOR_CONTROL_DATA::ID,
44868            ),
44869            (
44870                CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
44871                CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
44872            ),
44873            (AUTH_KEY_DATA::NAME, AUTH_KEY_DATA::ID),
44874            (LINK_NODE_STATUS_DATA::NAME, LINK_NODE_STATUS_DATA::ID),
44875            (SET_MODE_DATA::NAME, SET_MODE_DATA::ID),
44876            (PARAM_REQUEST_READ_DATA::NAME, PARAM_REQUEST_READ_DATA::ID),
44877            (PARAM_REQUEST_LIST_DATA::NAME, PARAM_REQUEST_LIST_DATA::ID),
44878            (PARAM_VALUE_DATA::NAME, PARAM_VALUE_DATA::ID),
44879            (PARAM_SET_DATA::NAME, PARAM_SET_DATA::ID),
44880            (GPS_RAW_INT_DATA::NAME, GPS_RAW_INT_DATA::ID),
44881            (GPS_STATUS_DATA::NAME, GPS_STATUS_DATA::ID),
44882            (SCALED_IMU_DATA::NAME, SCALED_IMU_DATA::ID),
44883            (RAW_IMU_DATA::NAME, RAW_IMU_DATA::ID),
44884            (RAW_PRESSURE_DATA::NAME, RAW_PRESSURE_DATA::ID),
44885            (SCALED_PRESSURE_DATA::NAME, SCALED_PRESSURE_DATA::ID),
44886            (ATTITUDE_DATA::NAME, ATTITUDE_DATA::ID),
44887            (ATTITUDE_QUATERNION_DATA::NAME, ATTITUDE_QUATERNION_DATA::ID),
44888            (LOCAL_POSITION_NED_DATA::NAME, LOCAL_POSITION_NED_DATA::ID),
44889            (GLOBAL_POSITION_INT_DATA::NAME, GLOBAL_POSITION_INT_DATA::ID),
44890            (RC_CHANNELS_SCALED_DATA::NAME, RC_CHANNELS_SCALED_DATA::ID),
44891            (RC_CHANNELS_RAW_DATA::NAME, RC_CHANNELS_RAW_DATA::ID),
44892            (SERVO_OUTPUT_RAW_DATA::NAME, SERVO_OUTPUT_RAW_DATA::ID),
44893            (
44894                MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
44895                MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
44896            ),
44897            (
44898                MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
44899                MISSION_WRITE_PARTIAL_LIST_DATA::ID,
44900            ),
44901            (MISSION_ITEM_DATA::NAME, MISSION_ITEM_DATA::ID),
44902            (MISSION_REQUEST_DATA::NAME, MISSION_REQUEST_DATA::ID),
44903            (MISSION_SET_CURRENT_DATA::NAME, MISSION_SET_CURRENT_DATA::ID),
44904            (MISSION_CURRENT_DATA::NAME, MISSION_CURRENT_DATA::ID),
44905            (
44906                MISSION_REQUEST_LIST_DATA::NAME,
44907                MISSION_REQUEST_LIST_DATA::ID,
44908            ),
44909            (MISSION_COUNT_DATA::NAME, MISSION_COUNT_DATA::ID),
44910            (MISSION_CLEAR_ALL_DATA::NAME, MISSION_CLEAR_ALL_DATA::ID),
44911            (
44912                MISSION_ITEM_REACHED_DATA::NAME,
44913                MISSION_ITEM_REACHED_DATA::ID,
44914            ),
44915            (MISSION_ACK_DATA::NAME, MISSION_ACK_DATA::ID),
44916            (
44917                SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
44918                SET_GPS_GLOBAL_ORIGIN_DATA::ID,
44919            ),
44920            (GPS_GLOBAL_ORIGIN_DATA::NAME, GPS_GLOBAL_ORIGIN_DATA::ID),
44921            (PARAM_MAP_RC_DATA::NAME, PARAM_MAP_RC_DATA::ID),
44922            (MISSION_REQUEST_INT_DATA::NAME, MISSION_REQUEST_INT_DATA::ID),
44923            (
44924                SAFETY_SET_ALLOWED_AREA_DATA::NAME,
44925                SAFETY_SET_ALLOWED_AREA_DATA::ID,
44926            ),
44927            (SAFETY_ALLOWED_AREA_DATA::NAME, SAFETY_ALLOWED_AREA_DATA::ID),
44928            (
44929                ATTITUDE_QUATERNION_COV_DATA::NAME,
44930                ATTITUDE_QUATERNION_COV_DATA::ID,
44931            ),
44932            (
44933                NAV_CONTROLLER_OUTPUT_DATA::NAME,
44934                NAV_CONTROLLER_OUTPUT_DATA::ID,
44935            ),
44936            (
44937                GLOBAL_POSITION_INT_COV_DATA::NAME,
44938                GLOBAL_POSITION_INT_COV_DATA::ID,
44939            ),
44940            (
44941                LOCAL_POSITION_NED_COV_DATA::NAME,
44942                LOCAL_POSITION_NED_COV_DATA::ID,
44943            ),
44944            (RC_CHANNELS_DATA::NAME, RC_CHANNELS_DATA::ID),
44945            (REQUEST_DATA_STREAM_DATA::NAME, REQUEST_DATA_STREAM_DATA::ID),
44946            (DATA_STREAM_DATA::NAME, DATA_STREAM_DATA::ID),
44947            (MANUAL_CONTROL_DATA::NAME, MANUAL_CONTROL_DATA::ID),
44948            (
44949                RC_CHANNELS_OVERRIDE_DATA::NAME,
44950                RC_CHANNELS_OVERRIDE_DATA::ID,
44951            ),
44952            (MISSION_ITEM_INT_DATA::NAME, MISSION_ITEM_INT_DATA::ID),
44953            (VFR_HUD_DATA::NAME, VFR_HUD_DATA::ID),
44954            (COMMAND_INT_DATA::NAME, COMMAND_INT_DATA::ID),
44955            (COMMAND_LONG_DATA::NAME, COMMAND_LONG_DATA::ID),
44956            (COMMAND_ACK_DATA::NAME, COMMAND_ACK_DATA::ID),
44957            (COMMAND_CANCEL_DATA::NAME, COMMAND_CANCEL_DATA::ID),
44958            (MANUAL_SETPOINT_DATA::NAME, MANUAL_SETPOINT_DATA::ID),
44959            (SET_ATTITUDE_TARGET_DATA::NAME, SET_ATTITUDE_TARGET_DATA::ID),
44960            (ATTITUDE_TARGET_DATA::NAME, ATTITUDE_TARGET_DATA::ID),
44961            (
44962                SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
44963                SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
44964            ),
44965            (
44966                POSITION_TARGET_LOCAL_NED_DATA::NAME,
44967                POSITION_TARGET_LOCAL_NED_DATA::ID,
44968            ),
44969            (
44970                SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
44971                SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
44972            ),
44973            (
44974                POSITION_TARGET_GLOBAL_INT_DATA::NAME,
44975                POSITION_TARGET_GLOBAL_INT_DATA::ID,
44976            ),
44977            (
44978                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME,
44979                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID,
44980            ),
44981            (HIL_STATE_DATA::NAME, HIL_STATE_DATA::ID),
44982            (HIL_CONTROLS_DATA::NAME, HIL_CONTROLS_DATA::ID),
44983            (HIL_RC_INPUTS_RAW_DATA::NAME, HIL_RC_INPUTS_RAW_DATA::ID),
44984            (
44985                HIL_ACTUATOR_CONTROLS_DATA::NAME,
44986                HIL_ACTUATOR_CONTROLS_DATA::ID,
44987            ),
44988            (OPTICAL_FLOW_DATA::NAME, OPTICAL_FLOW_DATA::ID),
44989            (
44990                GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
44991                GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
44992            ),
44993            (
44994                VISION_POSITION_ESTIMATE_DATA::NAME,
44995                VISION_POSITION_ESTIMATE_DATA::ID,
44996            ),
44997            (
44998                VISION_SPEED_ESTIMATE_DATA::NAME,
44999                VISION_SPEED_ESTIMATE_DATA::ID,
45000            ),
45001            (
45002                VICON_POSITION_ESTIMATE_DATA::NAME,
45003                VICON_POSITION_ESTIMATE_DATA::ID,
45004            ),
45005            (HIGHRES_IMU_DATA::NAME, HIGHRES_IMU_DATA::ID),
45006            (OPTICAL_FLOW_RAD_DATA::NAME, OPTICAL_FLOW_RAD_DATA::ID),
45007            (HIL_SENSOR_DATA::NAME, HIL_SENSOR_DATA::ID),
45008            (SIM_STATE_DATA::NAME, SIM_STATE_DATA::ID),
45009            (RADIO_STATUS_DATA::NAME, RADIO_STATUS_DATA::ID),
45010            (
45011                FILE_TRANSFER_PROTOCOL_DATA::NAME,
45012                FILE_TRANSFER_PROTOCOL_DATA::ID,
45013            ),
45014            (TIMESYNC_DATA::NAME, TIMESYNC_DATA::ID),
45015            (CAMERA_TRIGGER_DATA::NAME, CAMERA_TRIGGER_DATA::ID),
45016            (HIL_GPS_DATA::NAME, HIL_GPS_DATA::ID),
45017            (HIL_OPTICAL_FLOW_DATA::NAME, HIL_OPTICAL_FLOW_DATA::ID),
45018            (
45019                HIL_STATE_QUATERNION_DATA::NAME,
45020                HIL_STATE_QUATERNION_DATA::ID,
45021            ),
45022            (SCALED_IMU2_DATA::NAME, SCALED_IMU2_DATA::ID),
45023            (LOG_REQUEST_LIST_DATA::NAME, LOG_REQUEST_LIST_DATA::ID),
45024            (LOG_ENTRY_DATA::NAME, LOG_ENTRY_DATA::ID),
45025            (LOG_REQUEST_DATA_DATA::NAME, LOG_REQUEST_DATA_DATA::ID),
45026            (LOG_DATA_DATA::NAME, LOG_DATA_DATA::ID),
45027            (LOG_ERASE_DATA::NAME, LOG_ERASE_DATA::ID),
45028            (LOG_REQUEST_END_DATA::NAME, LOG_REQUEST_END_DATA::ID),
45029            (GPS_INJECT_DATA_DATA::NAME, GPS_INJECT_DATA_DATA::ID),
45030            (GPS2_RAW_DATA::NAME, GPS2_RAW_DATA::ID),
45031            (POWER_STATUS_DATA::NAME, POWER_STATUS_DATA::ID),
45032            (SERIAL_CONTROL_DATA::NAME, SERIAL_CONTROL_DATA::ID),
45033            (GPS_RTK_DATA::NAME, GPS_RTK_DATA::ID),
45034            (GPS2_RTK_DATA::NAME, GPS2_RTK_DATA::ID),
45035            (SCALED_IMU3_DATA::NAME, SCALED_IMU3_DATA::ID),
45036            (
45037                DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
45038                DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
45039            ),
45040            (ENCAPSULATED_DATA_DATA::NAME, ENCAPSULATED_DATA_DATA::ID),
45041            (DISTANCE_SENSOR_DATA::NAME, DISTANCE_SENSOR_DATA::ID),
45042            (TERRAIN_REQUEST_DATA::NAME, TERRAIN_REQUEST_DATA::ID),
45043            (TERRAIN_DATA_DATA::NAME, TERRAIN_DATA_DATA::ID),
45044            (TERRAIN_CHECK_DATA::NAME, TERRAIN_CHECK_DATA::ID),
45045            (TERRAIN_REPORT_DATA::NAME, TERRAIN_REPORT_DATA::ID),
45046            (SCALED_PRESSURE2_DATA::NAME, SCALED_PRESSURE2_DATA::ID),
45047            (ATT_POS_MOCAP_DATA::NAME, ATT_POS_MOCAP_DATA::ID),
45048            (
45049                SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
45050                SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
45051            ),
45052            (
45053                ACTUATOR_CONTROL_TARGET_DATA::NAME,
45054                ACTUATOR_CONTROL_TARGET_DATA::ID,
45055            ),
45056            (ALTITUDE_DATA::NAME, ALTITUDE_DATA::ID),
45057            (RESOURCE_REQUEST_DATA::NAME, RESOURCE_REQUEST_DATA::ID),
45058            (SCALED_PRESSURE3_DATA::NAME, SCALED_PRESSURE3_DATA::ID),
45059            (FOLLOW_TARGET_DATA::NAME, FOLLOW_TARGET_DATA::ID),
45060            (
45061                CONTROL_SYSTEM_STATE_DATA::NAME,
45062                CONTROL_SYSTEM_STATE_DATA::ID,
45063            ),
45064            (BATTERY_STATUS_DATA::NAME, BATTERY_STATUS_DATA::ID),
45065            (AUTOPILOT_VERSION_DATA::NAME, AUTOPILOT_VERSION_DATA::ID),
45066            (LANDING_TARGET_DATA::NAME, LANDING_TARGET_DATA::ID),
45067            (SENSOR_OFFSETS_DATA::NAME, SENSOR_OFFSETS_DATA::ID),
45068            (SET_MAG_OFFSETS_DATA::NAME, SET_MAG_OFFSETS_DATA::ID),
45069            (MEMINFO_DATA::NAME, MEMINFO_DATA::ID),
45070            (AP_ADC_DATA::NAME, AP_ADC_DATA::ID),
45071            (DIGICAM_CONFIGURE_DATA::NAME, DIGICAM_CONFIGURE_DATA::ID),
45072            (DIGICAM_CONTROL_DATA::NAME, DIGICAM_CONTROL_DATA::ID),
45073            (MOUNT_CONFIGURE_DATA::NAME, MOUNT_CONFIGURE_DATA::ID),
45074            (MOUNT_CONTROL_DATA::NAME, MOUNT_CONTROL_DATA::ID),
45075            (MOUNT_STATUS_DATA::NAME, MOUNT_STATUS_DATA::ID),
45076            (FENCE_POINT_DATA::NAME, FENCE_POINT_DATA::ID),
45077            (FENCE_FETCH_POINT_DATA::NAME, FENCE_FETCH_POINT_DATA::ID),
45078            (FENCE_STATUS_DATA::NAME, FENCE_STATUS_DATA::ID),
45079            (AHRS_DATA::NAME, AHRS_DATA::ID),
45080            (SIMSTATE_DATA::NAME, SIMSTATE_DATA::ID),
45081            (HWSTATUS_DATA::NAME, HWSTATUS_DATA::ID),
45082            (RADIO_DATA::NAME, RADIO_DATA::ID),
45083            (LIMITS_STATUS_DATA::NAME, LIMITS_STATUS_DATA::ID),
45084            (WIND_DATA::NAME, WIND_DATA::ID),
45085            (DATA16_DATA::NAME, DATA16_DATA::ID),
45086            (DATA32_DATA::NAME, DATA32_DATA::ID),
45087            (DATA64_DATA::NAME, DATA64_DATA::ID),
45088            (DATA96_DATA::NAME, DATA96_DATA::ID),
45089            (RANGEFINDER_DATA::NAME, RANGEFINDER_DATA::ID),
45090            (AIRSPEED_AUTOCAL_DATA::NAME, AIRSPEED_AUTOCAL_DATA::ID),
45091            (RALLY_POINT_DATA::NAME, RALLY_POINT_DATA::ID),
45092            (RALLY_FETCH_POINT_DATA::NAME, RALLY_FETCH_POINT_DATA::ID),
45093            (COMPASSMOT_STATUS_DATA::NAME, COMPASSMOT_STATUS_DATA::ID),
45094            (AHRS2_DATA::NAME, AHRS2_DATA::ID),
45095            (CAMERA_STATUS_DATA::NAME, CAMERA_STATUS_DATA::ID),
45096            (CAMERA_FEEDBACK_DATA::NAME, CAMERA_FEEDBACK_DATA::ID),
45097            (BATTERY2_DATA::NAME, BATTERY2_DATA::ID),
45098            (AHRS3_DATA::NAME, AHRS3_DATA::ID),
45099            (
45100                AUTOPILOT_VERSION_REQUEST_DATA::NAME,
45101                AUTOPILOT_VERSION_REQUEST_DATA::ID,
45102            ),
45103            (
45104                REMOTE_LOG_DATA_BLOCK_DATA::NAME,
45105                REMOTE_LOG_DATA_BLOCK_DATA::ID,
45106            ),
45107            (
45108                REMOTE_LOG_BLOCK_STATUS_DATA::NAME,
45109                REMOTE_LOG_BLOCK_STATUS_DATA::ID,
45110            ),
45111            (LED_CONTROL_DATA::NAME, LED_CONTROL_DATA::ID),
45112            (MAG_CAL_PROGRESS_DATA::NAME, MAG_CAL_PROGRESS_DATA::ID),
45113            (MAG_CAL_REPORT_DATA::NAME, MAG_CAL_REPORT_DATA::ID),
45114            (EKF_STATUS_REPORT_DATA::NAME, EKF_STATUS_REPORT_DATA::ID),
45115            (PID_TUNING_DATA::NAME, PID_TUNING_DATA::ID),
45116            (DEEPSTALL_DATA::NAME, DEEPSTALL_DATA::ID),
45117            (GIMBAL_REPORT_DATA::NAME, GIMBAL_REPORT_DATA::ID),
45118            (GIMBAL_CONTROL_DATA::NAME, GIMBAL_CONTROL_DATA::ID),
45119            (
45120                GIMBAL_TORQUE_CMD_REPORT_DATA::NAME,
45121                GIMBAL_TORQUE_CMD_REPORT_DATA::ID,
45122            ),
45123            (GOPRO_HEARTBEAT_DATA::NAME, GOPRO_HEARTBEAT_DATA::ID),
45124            (GOPRO_GET_REQUEST_DATA::NAME, GOPRO_GET_REQUEST_DATA::ID),
45125            (GOPRO_GET_RESPONSE_DATA::NAME, GOPRO_GET_RESPONSE_DATA::ID),
45126            (GOPRO_SET_REQUEST_DATA::NAME, GOPRO_SET_REQUEST_DATA::ID),
45127            (GOPRO_SET_RESPONSE_DATA::NAME, GOPRO_SET_RESPONSE_DATA::ID),
45128            (EFI_STATUS_DATA::NAME, EFI_STATUS_DATA::ID),
45129            (RPM_DATA::NAME, RPM_DATA::ID),
45130            (ESTIMATOR_STATUS_DATA::NAME, ESTIMATOR_STATUS_DATA::ID),
45131            (WIND_COV_DATA::NAME, WIND_COV_DATA::ID),
45132            (GPS_INPUT_DATA::NAME, GPS_INPUT_DATA::ID),
45133            (GPS_RTCM_DATA_DATA::NAME, GPS_RTCM_DATA_DATA::ID),
45134            (HIGH_LATENCY_DATA::NAME, HIGH_LATENCY_DATA::ID),
45135            (HIGH_LATENCY2_DATA::NAME, HIGH_LATENCY2_DATA::ID),
45136            (VIBRATION_DATA::NAME, VIBRATION_DATA::ID),
45137            (HOME_POSITION_DATA::NAME, HOME_POSITION_DATA::ID),
45138            (SET_HOME_POSITION_DATA::NAME, SET_HOME_POSITION_DATA::ID),
45139            (MESSAGE_INTERVAL_DATA::NAME, MESSAGE_INTERVAL_DATA::ID),
45140            (EXTENDED_SYS_STATE_DATA::NAME, EXTENDED_SYS_STATE_DATA::ID),
45141            (ADSB_VEHICLE_DATA::NAME, ADSB_VEHICLE_DATA::ID),
45142            (COLLISION_DATA::NAME, COLLISION_DATA::ID),
45143            (V2_EXTENSION_DATA::NAME, V2_EXTENSION_DATA::ID),
45144            (MEMORY_VECT_DATA::NAME, MEMORY_VECT_DATA::ID),
45145            (DEBUG_VECT_DATA::NAME, DEBUG_VECT_DATA::ID),
45146            (NAMED_VALUE_FLOAT_DATA::NAME, NAMED_VALUE_FLOAT_DATA::ID),
45147            (NAMED_VALUE_INT_DATA::NAME, NAMED_VALUE_INT_DATA::ID),
45148            (STATUSTEXT_DATA::NAME, STATUSTEXT_DATA::ID),
45149            (DEBUG_DATA::NAME, DEBUG_DATA::ID),
45150            (SETUP_SIGNING_DATA::NAME, SETUP_SIGNING_DATA::ID),
45151            (BUTTON_CHANGE_DATA::NAME, BUTTON_CHANGE_DATA::ID),
45152            (PLAY_TUNE_DATA::NAME, PLAY_TUNE_DATA::ID),
45153            (CAMERA_INFORMATION_DATA::NAME, CAMERA_INFORMATION_DATA::ID),
45154            (CAMERA_SETTINGS_DATA::NAME, CAMERA_SETTINGS_DATA::ID),
45155            (STORAGE_INFORMATION_DATA::NAME, STORAGE_INFORMATION_DATA::ID),
45156            (
45157                CAMERA_CAPTURE_STATUS_DATA::NAME,
45158                CAMERA_CAPTURE_STATUS_DATA::ID,
45159            ),
45160            (
45161                CAMERA_IMAGE_CAPTURED_DATA::NAME,
45162                CAMERA_IMAGE_CAPTURED_DATA::ID,
45163            ),
45164            (FLIGHT_INFORMATION_DATA::NAME, FLIGHT_INFORMATION_DATA::ID),
45165            (MOUNT_ORIENTATION_DATA::NAME, MOUNT_ORIENTATION_DATA::ID),
45166            (LOGGING_DATA_DATA::NAME, LOGGING_DATA_DATA::ID),
45167            (LOGGING_DATA_ACKED_DATA::NAME, LOGGING_DATA_ACKED_DATA::ID),
45168            (LOGGING_ACK_DATA::NAME, LOGGING_ACK_DATA::ID),
45169            (
45170                VIDEO_STREAM_INFORMATION_DATA::NAME,
45171                VIDEO_STREAM_INFORMATION_DATA::ID,
45172            ),
45173            (VIDEO_STREAM_STATUS_DATA::NAME, VIDEO_STREAM_STATUS_DATA::ID),
45174            (CAMERA_FOV_STATUS_DATA::NAME, CAMERA_FOV_STATUS_DATA::ID),
45175            (
45176                CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
45177                CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
45178            ),
45179            (
45180                CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
45181                CAMERA_TRACKING_GEO_STATUS_DATA::ID,
45182            ),
45183            (
45184                CAMERA_THERMAL_RANGE_DATA::NAME,
45185                CAMERA_THERMAL_RANGE_DATA::ID,
45186            ),
45187            (
45188                GIMBAL_MANAGER_INFORMATION_DATA::NAME,
45189                GIMBAL_MANAGER_INFORMATION_DATA::ID,
45190            ),
45191            (
45192                GIMBAL_MANAGER_STATUS_DATA::NAME,
45193                GIMBAL_MANAGER_STATUS_DATA::ID,
45194            ),
45195            (
45196                GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
45197                GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
45198            ),
45199            (
45200                GIMBAL_DEVICE_INFORMATION_DATA::NAME,
45201                GIMBAL_DEVICE_INFORMATION_DATA::ID,
45202            ),
45203            (
45204                GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
45205                GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
45206            ),
45207            (
45208                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
45209                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
45210            ),
45211            (
45212                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME,
45213                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID,
45214            ),
45215            (
45216                GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
45217                GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
45218            ),
45219            (
45220                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME,
45221                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID,
45222            ),
45223            (ESC_INFO_DATA::NAME, ESC_INFO_DATA::ID),
45224            (ESC_STATUS_DATA::NAME, ESC_STATUS_DATA::ID),
45225            (WIFI_CONFIG_AP_DATA::NAME, WIFI_CONFIG_AP_DATA::ID),
45226            (PROTOCOL_VERSION_DATA::NAME, PROTOCOL_VERSION_DATA::ID),
45227            (AIS_VESSEL_DATA::NAME, AIS_VESSEL_DATA::ID),
45228            (UAVCAN_NODE_STATUS_DATA::NAME, UAVCAN_NODE_STATUS_DATA::ID),
45229            (UAVCAN_NODE_INFO_DATA::NAME, UAVCAN_NODE_INFO_DATA::ID),
45230            (
45231                PARAM_EXT_REQUEST_READ_DATA::NAME,
45232                PARAM_EXT_REQUEST_READ_DATA::ID,
45233            ),
45234            (
45235                PARAM_EXT_REQUEST_LIST_DATA::NAME,
45236                PARAM_EXT_REQUEST_LIST_DATA::ID,
45237            ),
45238            (PARAM_EXT_VALUE_DATA::NAME, PARAM_EXT_VALUE_DATA::ID),
45239            (PARAM_EXT_SET_DATA::NAME, PARAM_EXT_SET_DATA::ID),
45240            (PARAM_EXT_ACK_DATA::NAME, PARAM_EXT_ACK_DATA::ID),
45241            (OBSTACLE_DISTANCE_DATA::NAME, OBSTACLE_DISTANCE_DATA::ID),
45242            (ODOMETRY_DATA::NAME, ODOMETRY_DATA::ID),
45243            (
45244                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME,
45245                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID,
45246            ),
45247            (
45248                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME,
45249                TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
45250            ),
45251            (CELLULAR_STATUS_DATA::NAME, CELLULAR_STATUS_DATA::ID),
45252            (ISBD_LINK_STATUS_DATA::NAME, ISBD_LINK_STATUS_DATA::ID),
45253            (CELLULAR_CONFIG_DATA::NAME, CELLULAR_CONFIG_DATA::ID),
45254            (RAW_RPM_DATA::NAME, RAW_RPM_DATA::ID),
45255            (UTM_GLOBAL_POSITION_DATA::NAME, UTM_GLOBAL_POSITION_DATA::ID),
45256            (DEBUG_FLOAT_ARRAY_DATA::NAME, DEBUG_FLOAT_ARRAY_DATA::ID),
45257            (
45258                ORBIT_EXECUTION_STATUS_DATA::NAME,
45259                ORBIT_EXECUTION_STATUS_DATA::ID,
45260            ),
45261            (SMART_BATTERY_INFO_DATA::NAME, SMART_BATTERY_INFO_DATA::ID),
45262            (FUEL_STATUS_DATA::NAME, FUEL_STATUS_DATA::ID),
45263            (BATTERY_INFO_DATA::NAME, BATTERY_INFO_DATA::ID),
45264            (GENERATOR_STATUS_DATA::NAME, GENERATOR_STATUS_DATA::ID),
45265            (
45266                ACTUATOR_OUTPUT_STATUS_DATA::NAME,
45267                ACTUATOR_OUTPUT_STATUS_DATA::ID,
45268            ),
45269            (
45270                TIME_ESTIMATE_TO_TARGET_DATA::NAME,
45271                TIME_ESTIMATE_TO_TARGET_DATA::ID,
45272            ),
45273            (TUNNEL_DATA::NAME, TUNNEL_DATA::ID),
45274            (CAN_FRAME_DATA::NAME, CAN_FRAME_DATA::ID),
45275            (CANFD_FRAME_DATA::NAME, CANFD_FRAME_DATA::ID),
45276            (CAN_FILTER_MODIFY_DATA::NAME, CAN_FILTER_MODIFY_DATA::ID),
45277            (
45278                ONBOARD_COMPUTER_STATUS_DATA::NAME,
45279                ONBOARD_COMPUTER_STATUS_DATA::ID,
45280            ),
45281            (
45282                COMPONENT_INFORMATION_DATA::NAME,
45283                COMPONENT_INFORMATION_DATA::ID,
45284            ),
45285            (
45286                COMPONENT_INFORMATION_BASIC_DATA::NAME,
45287                COMPONENT_INFORMATION_BASIC_DATA::ID,
45288            ),
45289            (COMPONENT_METADATA_DATA::NAME, COMPONENT_METADATA_DATA::ID),
45290            (PLAY_TUNE_V2_DATA::NAME, PLAY_TUNE_V2_DATA::ID),
45291            (SUPPORTED_TUNES_DATA::NAME, SUPPORTED_TUNES_DATA::ID),
45292            (EVENT_DATA::NAME, EVENT_DATA::ID),
45293            (
45294                CURRENT_EVENT_SEQUENCE_DATA::NAME,
45295                CURRENT_EVENT_SEQUENCE_DATA::ID,
45296            ),
45297            (REQUEST_EVENT_DATA::NAME, REQUEST_EVENT_DATA::ID),
45298            (
45299                RESPONSE_EVENT_ERROR_DATA::NAME,
45300                RESPONSE_EVENT_ERROR_DATA::ID,
45301            ),
45302            (AVAILABLE_MODES_DATA::NAME, AVAILABLE_MODES_DATA::ID),
45303            (CURRENT_MODE_DATA::NAME, CURRENT_MODE_DATA::ID),
45304            (
45305                AVAILABLE_MODES_MONITOR_DATA::NAME,
45306                AVAILABLE_MODES_MONITOR_DATA::ID,
45307            ),
45308            (ILLUMINATOR_STATUS_DATA::NAME, ILLUMINATOR_STATUS_DATA::ID),
45309            (WHEEL_DISTANCE_DATA::NAME, WHEEL_DISTANCE_DATA::ID),
45310            (WINCH_STATUS_DATA::NAME, WINCH_STATUS_DATA::ID),
45311            (
45312                UAVIONIX_ADSB_OUT_CFG_DATA::NAME,
45313                UAVIONIX_ADSB_OUT_CFG_DATA::ID,
45314            ),
45315            (
45316                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::NAME,
45317                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID,
45318            ),
45319            (
45320                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::NAME,
45321                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID,
45322            ),
45323            (
45324                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::NAME,
45325                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID,
45326            ),
45327            (
45328                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::NAME,
45329                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID,
45330            ),
45331            (UAVIONIX_ADSB_GET_DATA::NAME, UAVIONIX_ADSB_GET_DATA::ID),
45332            (
45333                UAVIONIX_ADSB_OUT_CONTROL_DATA::NAME,
45334                UAVIONIX_ADSB_OUT_CONTROL_DATA::ID,
45335            ),
45336            (
45337                UAVIONIX_ADSB_OUT_STATUS_DATA::NAME,
45338                UAVIONIX_ADSB_OUT_STATUS_DATA::ID,
45339            ),
45340            (LOWEHEISER_GOV_EFI_DATA::NAME, LOWEHEISER_GOV_EFI_DATA::ID),
45341            (DEVICE_OP_READ_DATA::NAME, DEVICE_OP_READ_DATA::ID),
45342            (
45343                DEVICE_OP_READ_REPLY_DATA::NAME,
45344                DEVICE_OP_READ_REPLY_DATA::ID,
45345            ),
45346            (DEVICE_OP_WRITE_DATA::NAME, DEVICE_OP_WRITE_DATA::ID),
45347            (
45348                DEVICE_OP_WRITE_REPLY_DATA::NAME,
45349                DEVICE_OP_WRITE_REPLY_DATA::ID,
45350            ),
45351            (SECURE_COMMAND_DATA::NAME, SECURE_COMMAND_DATA::ID),
45352            (
45353                SECURE_COMMAND_REPLY_DATA::NAME,
45354                SECURE_COMMAND_REPLY_DATA::ID,
45355            ),
45356            (ADAP_TUNING_DATA::NAME, ADAP_TUNING_DATA::ID),
45357            (
45358                VISION_POSITION_DELTA_DATA::NAME,
45359                VISION_POSITION_DELTA_DATA::ID,
45360            ),
45361            (AOA_SSA_DATA::NAME, AOA_SSA_DATA::ID),
45362            (
45363                ESC_TELEMETRY_1_TO_4_DATA::NAME,
45364                ESC_TELEMETRY_1_TO_4_DATA::ID,
45365            ),
45366            (
45367                ESC_TELEMETRY_5_TO_8_DATA::NAME,
45368                ESC_TELEMETRY_5_TO_8_DATA::ID,
45369            ),
45370            (
45371                ESC_TELEMETRY_9_TO_12_DATA::NAME,
45372                ESC_TELEMETRY_9_TO_12_DATA::ID,
45373            ),
45374            (OSD_PARAM_CONFIG_DATA::NAME, OSD_PARAM_CONFIG_DATA::ID),
45375            (
45376                OSD_PARAM_CONFIG_REPLY_DATA::NAME,
45377                OSD_PARAM_CONFIG_REPLY_DATA::ID,
45378            ),
45379            (
45380                OSD_PARAM_SHOW_CONFIG_DATA::NAME,
45381                OSD_PARAM_SHOW_CONFIG_DATA::ID,
45382            ),
45383            (
45384                OSD_PARAM_SHOW_CONFIG_REPLY_DATA::NAME,
45385                OSD_PARAM_SHOW_CONFIG_REPLY_DATA::ID,
45386            ),
45387            (
45388                OBSTACLE_DISTANCE_3D_DATA::NAME,
45389                OBSTACLE_DISTANCE_3D_DATA::ID,
45390            ),
45391            (WATER_DEPTH_DATA::NAME, WATER_DEPTH_DATA::ID),
45392            (MCU_STATUS_DATA::NAME, MCU_STATUS_DATA::ID),
45393            (
45394                ESC_TELEMETRY_13_TO_16_DATA::NAME,
45395                ESC_TELEMETRY_13_TO_16_DATA::ID,
45396            ),
45397            (
45398                ESC_TELEMETRY_17_TO_20_DATA::NAME,
45399                ESC_TELEMETRY_17_TO_20_DATA::ID,
45400            ),
45401            (
45402                ESC_TELEMETRY_21_TO_24_DATA::NAME,
45403                ESC_TELEMETRY_21_TO_24_DATA::ID,
45404            ),
45405            (
45406                ESC_TELEMETRY_25_TO_28_DATA::NAME,
45407                ESC_TELEMETRY_25_TO_28_DATA::ID,
45408            ),
45409            (
45410                ESC_TELEMETRY_29_TO_32_DATA::NAME,
45411                ESC_TELEMETRY_29_TO_32_DATA::ID,
45412            ),
45413            (
45414                OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
45415                OPEN_DRONE_ID_BASIC_ID_DATA::ID,
45416            ),
45417            (
45418                OPEN_DRONE_ID_LOCATION_DATA::NAME,
45419                OPEN_DRONE_ID_LOCATION_DATA::ID,
45420            ),
45421            (
45422                OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
45423                OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
45424            ),
45425            (
45426                OPEN_DRONE_ID_SELF_ID_DATA::NAME,
45427                OPEN_DRONE_ID_SELF_ID_DATA::ID,
45428            ),
45429            (
45430                OPEN_DRONE_ID_SYSTEM_DATA::NAME,
45431                OPEN_DRONE_ID_SYSTEM_DATA::ID,
45432            ),
45433            (
45434                OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
45435                OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
45436            ),
45437            (
45438                OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
45439                OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
45440            ),
45441            (
45442                OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
45443                OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
45444            ),
45445            (
45446                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
45447                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
45448            ),
45449            (HYGROMETER_SENSOR_DATA::NAME, HYGROMETER_SENSOR_DATA::ID),
45450            (ICAROUS_HEARTBEAT_DATA::NAME, ICAROUS_HEARTBEAT_DATA::ID),
45451            (
45452                ICAROUS_KINEMATIC_BANDS_DATA::NAME,
45453                ICAROUS_KINEMATIC_BANDS_DATA::ID,
45454            ),
45455            (CUBEPILOT_RAW_RC_DATA::NAME, CUBEPILOT_RAW_RC_DATA::ID),
45456            (
45457                HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME,
45458                HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID,
45459            ),
45460            (HERELINK_TELEM_DATA::NAME, HERELINK_TELEM_DATA::ID),
45461            (
45462                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME,
45463                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID,
45464            ),
45465            (
45466                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME,
45467                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID,
45468            ),
45469            (AIRLINK_AUTH_DATA::NAME, AIRLINK_AUTH_DATA::ID),
45470            (
45471                AIRLINK_AUTH_RESPONSE_DATA::NAME,
45472                AIRLINK_AUTH_RESPONSE_DATA::ID,
45473            ),
45474        ]
45475    }
45476}
45477impl Message for MavMessage {
45478    fn parse(
45479        version: MavlinkVersion,
45480        id: u32,
45481        payload: &[u8],
45482    ) -> Result<Self, ::mavlink_core::error::ParserError> {
45483        match id {
45484            ACTUATOR_CONTROL_TARGET_DATA::ID => {
45485                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
45486                    .map(Self::ACTUATOR_CONTROL_TARGET)
45487            }
45488            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
45489                .map(Self::ACTUATOR_OUTPUT_STATUS),
45490            ADAP_TUNING_DATA::ID => {
45491                ADAP_TUNING_DATA::deser(version, payload).map(Self::ADAP_TUNING)
45492            }
45493            ADSB_VEHICLE_DATA::ID => {
45494                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
45495            }
45496            AHRS_DATA::ID => AHRS_DATA::deser(version, payload).map(Self::AHRS),
45497            AHRS2_DATA::ID => AHRS2_DATA::deser(version, payload).map(Self::AHRS2),
45498            AHRS3_DATA::ID => AHRS3_DATA::deser(version, payload).map(Self::AHRS3),
45499            AIRLINK_AUTH_DATA::ID => {
45500                AIRLINK_AUTH_DATA::deser(version, payload).map(Self::AIRLINK_AUTH)
45501            }
45502            AIRLINK_AUTH_RESPONSE_DATA::ID => {
45503                AIRLINK_AUTH_RESPONSE_DATA::deser(version, payload).map(Self::AIRLINK_AUTH_RESPONSE)
45504            }
45505            AIRSPEED_AUTOCAL_DATA::ID => {
45506                AIRSPEED_AUTOCAL_DATA::deser(version, payload).map(Self::AIRSPEED_AUTOCAL)
45507            }
45508            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
45509            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
45510            AOA_SSA_DATA::ID => AOA_SSA_DATA::deser(version, payload).map(Self::AOA_SSA),
45511            AP_ADC_DATA::ID => AP_ADC_DATA::deser(version, payload).map(Self::AP_ADC),
45512            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
45513            ATTITUDE_QUATERNION_DATA::ID => {
45514                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
45515            }
45516            ATTITUDE_QUATERNION_COV_DATA::ID => {
45517                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
45518                    .map(Self::ATTITUDE_QUATERNION_COV)
45519            }
45520            ATTITUDE_TARGET_DATA::ID => {
45521                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
45522            }
45523            ATT_POS_MOCAP_DATA::ID => {
45524                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
45525            }
45526            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
45527            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
45528                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
45529                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
45530            }
45531            AUTOPILOT_VERSION_DATA::ID => {
45532                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
45533            }
45534            AUTOPILOT_VERSION_REQUEST_DATA::ID => {
45535                AUTOPILOT_VERSION_REQUEST_DATA::deser(version, payload)
45536                    .map(Self::AUTOPILOT_VERSION_REQUEST)
45537            }
45538            AVAILABLE_MODES_DATA::ID => {
45539                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
45540            }
45541            AVAILABLE_MODES_MONITOR_DATA::ID => {
45542                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
45543                    .map(Self::AVAILABLE_MODES_MONITOR)
45544            }
45545            BATTERY2_DATA::ID => BATTERY2_DATA::deser(version, payload).map(Self::BATTERY2),
45546            BATTERY_INFO_DATA::ID => {
45547                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
45548            }
45549            BATTERY_STATUS_DATA::ID => {
45550                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
45551            }
45552            BUTTON_CHANGE_DATA::ID => {
45553                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
45554            }
45555            CAMERA_CAPTURE_STATUS_DATA::ID => {
45556                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
45557            }
45558            CAMERA_FEEDBACK_DATA::ID => {
45559                CAMERA_FEEDBACK_DATA::deser(version, payload).map(Self::CAMERA_FEEDBACK)
45560            }
45561            CAMERA_FOV_STATUS_DATA::ID => {
45562                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
45563            }
45564            CAMERA_IMAGE_CAPTURED_DATA::ID => {
45565                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
45566            }
45567            CAMERA_INFORMATION_DATA::ID => {
45568                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
45569            }
45570            CAMERA_SETTINGS_DATA::ID => {
45571                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
45572            }
45573            CAMERA_STATUS_DATA::ID => {
45574                CAMERA_STATUS_DATA::deser(version, payload).map(Self::CAMERA_STATUS)
45575            }
45576            CAMERA_THERMAL_RANGE_DATA::ID => {
45577                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
45578            }
45579            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
45580                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
45581                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
45582            }
45583            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
45584                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
45585                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
45586            }
45587            CAMERA_TRIGGER_DATA::ID => {
45588                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
45589            }
45590            CANFD_FRAME_DATA::ID => {
45591                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
45592            }
45593            CAN_FILTER_MODIFY_DATA::ID => {
45594                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
45595            }
45596            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
45597            CELLULAR_CONFIG_DATA::ID => {
45598                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
45599            }
45600            CELLULAR_STATUS_DATA::ID => {
45601                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
45602            }
45603            CHANGE_OPERATOR_CONTROL_DATA::ID => {
45604                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
45605                    .map(Self::CHANGE_OPERATOR_CONTROL)
45606            }
45607            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
45608                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
45609                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
45610            }
45611            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
45612            COMMAND_ACK_DATA::ID => {
45613                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
45614            }
45615            COMMAND_CANCEL_DATA::ID => {
45616                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
45617            }
45618            COMMAND_INT_DATA::ID => {
45619                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
45620            }
45621            COMMAND_LONG_DATA::ID => {
45622                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
45623            }
45624            COMPASSMOT_STATUS_DATA::ID => {
45625                COMPASSMOT_STATUS_DATA::deser(version, payload).map(Self::COMPASSMOT_STATUS)
45626            }
45627            COMPONENT_INFORMATION_DATA::ID => {
45628                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
45629            }
45630            COMPONENT_INFORMATION_BASIC_DATA::ID => {
45631                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
45632                    .map(Self::COMPONENT_INFORMATION_BASIC)
45633            }
45634            COMPONENT_METADATA_DATA::ID => {
45635                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
45636            }
45637            CONTROL_SYSTEM_STATE_DATA::ID => {
45638                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
45639            }
45640            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => {
45641                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::deser(version, payload)
45642                    .map(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP)
45643            }
45644            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
45645                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::deser(version, payload)
45646                    .map(Self::CUBEPILOT_FIRMWARE_UPDATE_START)
45647            }
45648            CUBEPILOT_RAW_RC_DATA::ID => {
45649                CUBEPILOT_RAW_RC_DATA::deser(version, payload).map(Self::CUBEPILOT_RAW_RC)
45650            }
45651            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
45652                .map(Self::CURRENT_EVENT_SEQUENCE),
45653            CURRENT_MODE_DATA::ID => {
45654                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
45655            }
45656            DATA16_DATA::ID => DATA16_DATA::deser(version, payload).map(Self::DATA16),
45657            DATA32_DATA::ID => DATA32_DATA::deser(version, payload).map(Self::DATA32),
45658            DATA64_DATA::ID => DATA64_DATA::deser(version, payload).map(Self::DATA64),
45659            DATA96_DATA::ID => DATA96_DATA::deser(version, payload).map(Self::DATA96),
45660            DATA_STREAM_DATA::ID => {
45661                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
45662            }
45663            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
45664                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
45665                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
45666            }
45667            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
45668            DEBUG_FLOAT_ARRAY_DATA::ID => {
45669                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
45670            }
45671            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
45672            DEEPSTALL_DATA::ID => DEEPSTALL_DATA::deser(version, payload).map(Self::DEEPSTALL),
45673            DEVICE_OP_READ_DATA::ID => {
45674                DEVICE_OP_READ_DATA::deser(version, payload).map(Self::DEVICE_OP_READ)
45675            }
45676            DEVICE_OP_READ_REPLY_DATA::ID => {
45677                DEVICE_OP_READ_REPLY_DATA::deser(version, payload).map(Self::DEVICE_OP_READ_REPLY)
45678            }
45679            DEVICE_OP_WRITE_DATA::ID => {
45680                DEVICE_OP_WRITE_DATA::deser(version, payload).map(Self::DEVICE_OP_WRITE)
45681            }
45682            DEVICE_OP_WRITE_REPLY_DATA::ID => {
45683                DEVICE_OP_WRITE_REPLY_DATA::deser(version, payload).map(Self::DEVICE_OP_WRITE_REPLY)
45684            }
45685            DIGICAM_CONFIGURE_DATA::ID => {
45686                DIGICAM_CONFIGURE_DATA::deser(version, payload).map(Self::DIGICAM_CONFIGURE)
45687            }
45688            DIGICAM_CONTROL_DATA::ID => {
45689                DIGICAM_CONTROL_DATA::deser(version, payload).map(Self::DIGICAM_CONTROL)
45690            }
45691            DISTANCE_SENSOR_DATA::ID => {
45692                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
45693            }
45694            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
45695            EKF_STATUS_REPORT_DATA::ID => {
45696                EKF_STATUS_REPORT_DATA::deser(version, payload).map(Self::EKF_STATUS_REPORT)
45697            }
45698            ENCAPSULATED_DATA_DATA::ID => {
45699                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
45700            }
45701            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
45702            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
45703            ESC_TELEMETRY_13_TO_16_DATA::ID => ESC_TELEMETRY_13_TO_16_DATA::deser(version, payload)
45704                .map(Self::ESC_TELEMETRY_13_TO_16),
45705            ESC_TELEMETRY_17_TO_20_DATA::ID => ESC_TELEMETRY_17_TO_20_DATA::deser(version, payload)
45706                .map(Self::ESC_TELEMETRY_17_TO_20),
45707            ESC_TELEMETRY_1_TO_4_DATA::ID => {
45708                ESC_TELEMETRY_1_TO_4_DATA::deser(version, payload).map(Self::ESC_TELEMETRY_1_TO_4)
45709            }
45710            ESC_TELEMETRY_21_TO_24_DATA::ID => ESC_TELEMETRY_21_TO_24_DATA::deser(version, payload)
45711                .map(Self::ESC_TELEMETRY_21_TO_24),
45712            ESC_TELEMETRY_25_TO_28_DATA::ID => ESC_TELEMETRY_25_TO_28_DATA::deser(version, payload)
45713                .map(Self::ESC_TELEMETRY_25_TO_28),
45714            ESC_TELEMETRY_29_TO_32_DATA::ID => ESC_TELEMETRY_29_TO_32_DATA::deser(version, payload)
45715                .map(Self::ESC_TELEMETRY_29_TO_32),
45716            ESC_TELEMETRY_5_TO_8_DATA::ID => {
45717                ESC_TELEMETRY_5_TO_8_DATA::deser(version, payload).map(Self::ESC_TELEMETRY_5_TO_8)
45718            }
45719            ESC_TELEMETRY_9_TO_12_DATA::ID => {
45720                ESC_TELEMETRY_9_TO_12_DATA::deser(version, payload).map(Self::ESC_TELEMETRY_9_TO_12)
45721            }
45722            ESTIMATOR_STATUS_DATA::ID => {
45723                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
45724            }
45725            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
45726            EXTENDED_SYS_STATE_DATA::ID => {
45727                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
45728            }
45729            FENCE_FETCH_POINT_DATA::ID => {
45730                FENCE_FETCH_POINT_DATA::deser(version, payload).map(Self::FENCE_FETCH_POINT)
45731            }
45732            FENCE_POINT_DATA::ID => {
45733                FENCE_POINT_DATA::deser(version, payload).map(Self::FENCE_POINT)
45734            }
45735            FENCE_STATUS_DATA::ID => {
45736                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
45737            }
45738            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
45739                .map(Self::FILE_TRANSFER_PROTOCOL),
45740            FLIGHT_INFORMATION_DATA::ID => {
45741                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
45742            }
45743            FOLLOW_TARGET_DATA::ID => {
45744                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
45745            }
45746            FUEL_STATUS_DATA::ID => {
45747                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
45748            }
45749            GENERATOR_STATUS_DATA::ID => {
45750                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
45751            }
45752            GIMBAL_CONTROL_DATA::ID => {
45753                GIMBAL_CONTROL_DATA::deser(version, payload).map(Self::GIMBAL_CONTROL)
45754            }
45755            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
45756                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
45757                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
45758            }
45759            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
45760                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
45761                    .map(Self::GIMBAL_DEVICE_INFORMATION)
45762            }
45763            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
45764                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
45765                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
45766            }
45767            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
45768                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
45769                    .map(Self::GIMBAL_MANAGER_INFORMATION)
45770            }
45771            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
45772                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
45773                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
45774            }
45775            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
45776                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
45777                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
45778            }
45779            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
45780                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
45781                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
45782            }
45783            GIMBAL_MANAGER_STATUS_DATA::ID => {
45784                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
45785            }
45786            GIMBAL_REPORT_DATA::ID => {
45787                GIMBAL_REPORT_DATA::deser(version, payload).map(Self::GIMBAL_REPORT)
45788            }
45789            GIMBAL_TORQUE_CMD_REPORT_DATA::ID => {
45790                GIMBAL_TORQUE_CMD_REPORT_DATA::deser(version, payload)
45791                    .map(Self::GIMBAL_TORQUE_CMD_REPORT)
45792            }
45793            GLOBAL_POSITION_INT_DATA::ID => {
45794                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
45795            }
45796            GLOBAL_POSITION_INT_COV_DATA::ID => {
45797                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
45798                    .map(Self::GLOBAL_POSITION_INT_COV)
45799            }
45800            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
45801                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
45802                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
45803            }
45804            GOPRO_GET_REQUEST_DATA::ID => {
45805                GOPRO_GET_REQUEST_DATA::deser(version, payload).map(Self::GOPRO_GET_REQUEST)
45806            }
45807            GOPRO_GET_RESPONSE_DATA::ID => {
45808                GOPRO_GET_RESPONSE_DATA::deser(version, payload).map(Self::GOPRO_GET_RESPONSE)
45809            }
45810            GOPRO_HEARTBEAT_DATA::ID => {
45811                GOPRO_HEARTBEAT_DATA::deser(version, payload).map(Self::GOPRO_HEARTBEAT)
45812            }
45813            GOPRO_SET_REQUEST_DATA::ID => {
45814                GOPRO_SET_REQUEST_DATA::deser(version, payload).map(Self::GOPRO_SET_REQUEST)
45815            }
45816            GOPRO_SET_RESPONSE_DATA::ID => {
45817                GOPRO_SET_RESPONSE_DATA::deser(version, payload).map(Self::GOPRO_SET_RESPONSE)
45818            }
45819            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
45820            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
45821            GPS_GLOBAL_ORIGIN_DATA::ID => {
45822                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
45823            }
45824            GPS_INJECT_DATA_DATA::ID => {
45825                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
45826            }
45827            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
45828            GPS_RAW_INT_DATA::ID => {
45829                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
45830            }
45831            GPS_RTCM_DATA_DATA::ID => {
45832                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
45833            }
45834            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
45835            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
45836            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
45837            HERELINK_TELEM_DATA::ID => {
45838                HERELINK_TELEM_DATA::deser(version, payload).map(Self::HERELINK_TELEM)
45839            }
45840            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
45841                HERELINK_VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
45842                    .map(Self::HERELINK_VIDEO_STREAM_INFORMATION)
45843            }
45844            HIGHRES_IMU_DATA::ID => {
45845                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
45846            }
45847            HIGH_LATENCY_DATA::ID => {
45848                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
45849            }
45850            HIGH_LATENCY2_DATA::ID => {
45851                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
45852            }
45853            HIL_ACTUATOR_CONTROLS_DATA::ID => {
45854                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
45855            }
45856            HIL_CONTROLS_DATA::ID => {
45857                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
45858            }
45859            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
45860            HIL_OPTICAL_FLOW_DATA::ID => {
45861                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
45862            }
45863            HIL_RC_INPUTS_RAW_DATA::ID => {
45864                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
45865            }
45866            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
45867            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
45868            HIL_STATE_QUATERNION_DATA::ID => {
45869                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
45870            }
45871            HOME_POSITION_DATA::ID => {
45872                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
45873            }
45874            HWSTATUS_DATA::ID => HWSTATUS_DATA::deser(version, payload).map(Self::HWSTATUS),
45875            HYGROMETER_SENSOR_DATA::ID => {
45876                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
45877            }
45878            ICAROUS_HEARTBEAT_DATA::ID => {
45879                ICAROUS_HEARTBEAT_DATA::deser(version, payload).map(Self::ICAROUS_HEARTBEAT)
45880            }
45881            ICAROUS_KINEMATIC_BANDS_DATA::ID => {
45882                ICAROUS_KINEMATIC_BANDS_DATA::deser(version, payload)
45883                    .map(Self::ICAROUS_KINEMATIC_BANDS)
45884            }
45885            ILLUMINATOR_STATUS_DATA::ID => {
45886                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
45887            }
45888            ISBD_LINK_STATUS_DATA::ID => {
45889                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
45890            }
45891            LANDING_TARGET_DATA::ID => {
45892                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
45893            }
45894            LED_CONTROL_DATA::ID => {
45895                LED_CONTROL_DATA::deser(version, payload).map(Self::LED_CONTROL)
45896            }
45897            LIMITS_STATUS_DATA::ID => {
45898                LIMITS_STATUS_DATA::deser(version, payload).map(Self::LIMITS_STATUS)
45899            }
45900            LINK_NODE_STATUS_DATA::ID => {
45901                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
45902            }
45903            LOCAL_POSITION_NED_DATA::ID => {
45904                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
45905            }
45906            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
45907                .map(Self::LOCAL_POSITION_NED_COV),
45908            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
45909                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
45910                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
45911            }
45912            LOGGING_ACK_DATA::ID => {
45913                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
45914            }
45915            LOGGING_DATA_DATA::ID => {
45916                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
45917            }
45918            LOGGING_DATA_ACKED_DATA::ID => {
45919                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
45920            }
45921            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
45922            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
45923            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
45924            LOG_REQUEST_DATA_DATA::ID => {
45925                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
45926            }
45927            LOG_REQUEST_END_DATA::ID => {
45928                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
45929            }
45930            LOG_REQUEST_LIST_DATA::ID => {
45931                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
45932            }
45933            LOWEHEISER_GOV_EFI_DATA::ID => {
45934                LOWEHEISER_GOV_EFI_DATA::deser(version, payload).map(Self::LOWEHEISER_GOV_EFI)
45935            }
45936            MAG_CAL_PROGRESS_DATA::ID => {
45937                MAG_CAL_PROGRESS_DATA::deser(version, payload).map(Self::MAG_CAL_PROGRESS)
45938            }
45939            MAG_CAL_REPORT_DATA::ID => {
45940                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
45941            }
45942            MANUAL_CONTROL_DATA::ID => {
45943                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
45944            }
45945            MANUAL_SETPOINT_DATA::ID => {
45946                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
45947            }
45948            MCU_STATUS_DATA::ID => MCU_STATUS_DATA::deser(version, payload).map(Self::MCU_STATUS),
45949            MEMINFO_DATA::ID => MEMINFO_DATA::deser(version, payload).map(Self::MEMINFO),
45950            MEMORY_VECT_DATA::ID => {
45951                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
45952            }
45953            MESSAGE_INTERVAL_DATA::ID => {
45954                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
45955            }
45956            MISSION_ACK_DATA::ID => {
45957                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
45958            }
45959            MISSION_CLEAR_ALL_DATA::ID => {
45960                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
45961            }
45962            MISSION_COUNT_DATA::ID => {
45963                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
45964            }
45965            MISSION_CURRENT_DATA::ID => {
45966                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
45967            }
45968            MISSION_ITEM_DATA::ID => {
45969                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
45970            }
45971            MISSION_ITEM_INT_DATA::ID => {
45972                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
45973            }
45974            MISSION_ITEM_REACHED_DATA::ID => {
45975                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
45976            }
45977            MISSION_REQUEST_DATA::ID => {
45978                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
45979            }
45980            MISSION_REQUEST_INT_DATA::ID => {
45981                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
45982            }
45983            MISSION_REQUEST_LIST_DATA::ID => {
45984                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
45985            }
45986            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
45987                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
45988                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
45989            }
45990            MISSION_SET_CURRENT_DATA::ID => {
45991                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
45992            }
45993            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
45994                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
45995                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
45996            }
45997            MOUNT_CONFIGURE_DATA::ID => {
45998                MOUNT_CONFIGURE_DATA::deser(version, payload).map(Self::MOUNT_CONFIGURE)
45999            }
46000            MOUNT_CONTROL_DATA::ID => {
46001                MOUNT_CONTROL_DATA::deser(version, payload).map(Self::MOUNT_CONTROL)
46002            }
46003            MOUNT_ORIENTATION_DATA::ID => {
46004                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
46005            }
46006            MOUNT_STATUS_DATA::ID => {
46007                MOUNT_STATUS_DATA::deser(version, payload).map(Self::MOUNT_STATUS)
46008            }
46009            NAMED_VALUE_FLOAT_DATA::ID => {
46010                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
46011            }
46012            NAMED_VALUE_INT_DATA::ID => {
46013                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
46014            }
46015            NAV_CONTROLLER_OUTPUT_DATA::ID => {
46016                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
46017            }
46018            OBSTACLE_DISTANCE_DATA::ID => {
46019                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
46020            }
46021            OBSTACLE_DISTANCE_3D_DATA::ID => {
46022                OBSTACLE_DISTANCE_3D_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE_3D)
46023            }
46024            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
46025            ONBOARD_COMPUTER_STATUS_DATA::ID => {
46026                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
46027                    .map(Self::ONBOARD_COMPUTER_STATUS)
46028            }
46029            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
46030                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
46031                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
46032            }
46033            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
46034                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
46035                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
46036            }
46037            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
46038                .map(Self::OPEN_DRONE_ID_BASIC_ID),
46039            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
46040                .map(Self::OPEN_DRONE_ID_LOCATION),
46041            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
46042                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
46043                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
46044            }
46045            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
46046                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
46047                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
46048            }
46049            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
46050                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
46051            }
46052            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
46053                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
46054            }
46055            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
46056                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
46057                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
46058            }
46059            OPTICAL_FLOW_DATA::ID => {
46060                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
46061            }
46062            OPTICAL_FLOW_RAD_DATA::ID => {
46063                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
46064            }
46065            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
46066                .map(Self::ORBIT_EXECUTION_STATUS),
46067            OSD_PARAM_CONFIG_DATA::ID => {
46068                OSD_PARAM_CONFIG_DATA::deser(version, payload).map(Self::OSD_PARAM_CONFIG)
46069            }
46070            OSD_PARAM_CONFIG_REPLY_DATA::ID => OSD_PARAM_CONFIG_REPLY_DATA::deser(version, payload)
46071                .map(Self::OSD_PARAM_CONFIG_REPLY),
46072            OSD_PARAM_SHOW_CONFIG_DATA::ID => {
46073                OSD_PARAM_SHOW_CONFIG_DATA::deser(version, payload).map(Self::OSD_PARAM_SHOW_CONFIG)
46074            }
46075            OSD_PARAM_SHOW_CONFIG_REPLY_DATA::ID => {
46076                OSD_PARAM_SHOW_CONFIG_REPLY_DATA::deser(version, payload)
46077                    .map(Self::OSD_PARAM_SHOW_CONFIG_REPLY)
46078            }
46079            PARAM_EXT_ACK_DATA::ID => {
46080                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
46081            }
46082            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
46083                .map(Self::PARAM_EXT_REQUEST_LIST),
46084            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
46085                .map(Self::PARAM_EXT_REQUEST_READ),
46086            PARAM_EXT_SET_DATA::ID => {
46087                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
46088            }
46089            PARAM_EXT_VALUE_DATA::ID => {
46090                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
46091            }
46092            PARAM_MAP_RC_DATA::ID => {
46093                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
46094            }
46095            PARAM_REQUEST_LIST_DATA::ID => {
46096                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
46097            }
46098            PARAM_REQUEST_READ_DATA::ID => {
46099                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
46100            }
46101            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
46102            PARAM_VALUE_DATA::ID => {
46103                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
46104            }
46105            PID_TUNING_DATA::ID => PID_TUNING_DATA::deser(version, payload).map(Self::PID_TUNING),
46106            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
46107            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
46108            PLAY_TUNE_V2_DATA::ID => {
46109                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
46110            }
46111            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
46112                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
46113                    .map(Self::POSITION_TARGET_GLOBAL_INT)
46114            }
46115            POSITION_TARGET_LOCAL_NED_DATA::ID => {
46116                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
46117                    .map(Self::POSITION_TARGET_LOCAL_NED)
46118            }
46119            POWER_STATUS_DATA::ID => {
46120                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
46121            }
46122            PROTOCOL_VERSION_DATA::ID => {
46123                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
46124            }
46125            RADIO_DATA::ID => RADIO_DATA::deser(version, payload).map(Self::RADIO),
46126            RADIO_STATUS_DATA::ID => {
46127                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
46128            }
46129            RALLY_FETCH_POINT_DATA::ID => {
46130                RALLY_FETCH_POINT_DATA::deser(version, payload).map(Self::RALLY_FETCH_POINT)
46131            }
46132            RALLY_POINT_DATA::ID => {
46133                RALLY_POINT_DATA::deser(version, payload).map(Self::RALLY_POINT)
46134            }
46135            RANGEFINDER_DATA::ID => {
46136                RANGEFINDER_DATA::deser(version, payload).map(Self::RANGEFINDER)
46137            }
46138            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
46139            RAW_PRESSURE_DATA::ID => {
46140                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
46141            }
46142            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
46143            RC_CHANNELS_DATA::ID => {
46144                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
46145            }
46146            RC_CHANNELS_OVERRIDE_DATA::ID => {
46147                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
46148            }
46149            RC_CHANNELS_RAW_DATA::ID => {
46150                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
46151            }
46152            RC_CHANNELS_SCALED_DATA::ID => {
46153                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
46154            }
46155            REMOTE_LOG_BLOCK_STATUS_DATA::ID => {
46156                REMOTE_LOG_BLOCK_STATUS_DATA::deser(version, payload)
46157                    .map(Self::REMOTE_LOG_BLOCK_STATUS)
46158            }
46159            REMOTE_LOG_DATA_BLOCK_DATA::ID => {
46160                REMOTE_LOG_DATA_BLOCK_DATA::deser(version, payload).map(Self::REMOTE_LOG_DATA_BLOCK)
46161            }
46162            REQUEST_DATA_STREAM_DATA::ID => {
46163                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
46164            }
46165            REQUEST_EVENT_DATA::ID => {
46166                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
46167            }
46168            RESOURCE_REQUEST_DATA::ID => {
46169                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
46170            }
46171            RESPONSE_EVENT_ERROR_DATA::ID => {
46172                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
46173            }
46174            RPM_DATA::ID => RPM_DATA::deser(version, payload).map(Self::RPM),
46175            SAFETY_ALLOWED_AREA_DATA::ID => {
46176                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
46177            }
46178            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
46179                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
46180                    .map(Self::SAFETY_SET_ALLOWED_AREA)
46181            }
46182            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
46183            SCALED_IMU2_DATA::ID => {
46184                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
46185            }
46186            SCALED_IMU3_DATA::ID => {
46187                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
46188            }
46189            SCALED_PRESSURE_DATA::ID => {
46190                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
46191            }
46192            SCALED_PRESSURE2_DATA::ID => {
46193                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
46194            }
46195            SCALED_PRESSURE3_DATA::ID => {
46196                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
46197            }
46198            SECURE_COMMAND_DATA::ID => {
46199                SECURE_COMMAND_DATA::deser(version, payload).map(Self::SECURE_COMMAND)
46200            }
46201            SECURE_COMMAND_REPLY_DATA::ID => {
46202                SECURE_COMMAND_REPLY_DATA::deser(version, payload).map(Self::SECURE_COMMAND_REPLY)
46203            }
46204            SENSOR_OFFSETS_DATA::ID => {
46205                SENSOR_OFFSETS_DATA::deser(version, payload).map(Self::SENSOR_OFFSETS)
46206            }
46207            SERIAL_CONTROL_DATA::ID => {
46208                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
46209            }
46210            SERVO_OUTPUT_RAW_DATA::ID => {
46211                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
46212            }
46213            SETUP_SIGNING_DATA::ID => {
46214                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
46215            }
46216            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
46217                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
46218                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
46219            }
46220            SET_ATTITUDE_TARGET_DATA::ID => {
46221                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
46222            }
46223            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
46224                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
46225            }
46226            SET_HOME_POSITION_DATA::ID => {
46227                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
46228            }
46229            SET_MAG_OFFSETS_DATA::ID => {
46230                SET_MAG_OFFSETS_DATA::deser(version, payload).map(Self::SET_MAG_OFFSETS)
46231            }
46232            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
46233            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
46234                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
46235                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
46236            }
46237            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
46238                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
46239                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
46240            }
46241            SIMSTATE_DATA::ID => SIMSTATE_DATA::deser(version, payload).map(Self::SIMSTATE),
46242            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
46243            SMART_BATTERY_INFO_DATA::ID => {
46244                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
46245            }
46246            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
46247            STORAGE_INFORMATION_DATA::ID => {
46248                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
46249            }
46250            SUPPORTED_TUNES_DATA::ID => {
46251                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
46252            }
46253            SYSTEM_TIME_DATA::ID => {
46254                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
46255            }
46256            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
46257            TERRAIN_CHECK_DATA::ID => {
46258                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
46259            }
46260            TERRAIN_DATA_DATA::ID => {
46261                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
46262            }
46263            TERRAIN_REPORT_DATA::ID => {
46264                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
46265            }
46266            TERRAIN_REQUEST_DATA::ID => {
46267                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
46268            }
46269            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
46270            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
46271                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
46272                    .map(Self::TIME_ESTIMATE_TO_TARGET)
46273            }
46274            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
46275                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
46276                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
46277            }
46278            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
46279                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
46280                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
46281            }
46282            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
46283            UAVCAN_NODE_INFO_DATA::ID => {
46284                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
46285            }
46286            UAVCAN_NODE_STATUS_DATA::ID => {
46287                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
46288            }
46289            UAVIONIX_ADSB_GET_DATA::ID => {
46290                UAVIONIX_ADSB_GET_DATA::deser(version, payload).map(Self::UAVIONIX_ADSB_GET)
46291            }
46292            UAVIONIX_ADSB_OUT_CFG_DATA::ID => {
46293                UAVIONIX_ADSB_OUT_CFG_DATA::deser(version, payload).map(Self::UAVIONIX_ADSB_OUT_CFG)
46294            }
46295            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => {
46296                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::deser(version, payload)
46297                    .map(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID)
46298            }
46299            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
46300                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::deser(version, payload)
46301                    .map(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION)
46302            }
46303            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => {
46304                UAVIONIX_ADSB_OUT_CONTROL_DATA::deser(version, payload)
46305                    .map(Self::UAVIONIX_ADSB_OUT_CONTROL)
46306            }
46307            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => {
46308                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::deser(version, payload)
46309                    .map(Self::UAVIONIX_ADSB_OUT_DYNAMIC)
46310            }
46311            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => {
46312                UAVIONIX_ADSB_OUT_STATUS_DATA::deser(version, payload)
46313                    .map(Self::UAVIONIX_ADSB_OUT_STATUS)
46314            }
46315            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
46316                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::deser(version, payload)
46317                    .map(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT)
46318            }
46319            UTM_GLOBAL_POSITION_DATA::ID => {
46320                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
46321            }
46322            V2_EXTENSION_DATA::ID => {
46323                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
46324            }
46325            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
46326            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
46327            VICON_POSITION_ESTIMATE_DATA::ID => {
46328                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
46329                    .map(Self::VICON_POSITION_ESTIMATE)
46330            }
46331            VIDEO_STREAM_INFORMATION_DATA::ID => {
46332                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
46333                    .map(Self::VIDEO_STREAM_INFORMATION)
46334            }
46335            VIDEO_STREAM_STATUS_DATA::ID => {
46336                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
46337            }
46338            VISION_POSITION_DELTA_DATA::ID => {
46339                VISION_POSITION_DELTA_DATA::deser(version, payload).map(Self::VISION_POSITION_DELTA)
46340            }
46341            VISION_POSITION_ESTIMATE_DATA::ID => {
46342                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
46343                    .map(Self::VISION_POSITION_ESTIMATE)
46344            }
46345            VISION_SPEED_ESTIMATE_DATA::ID => {
46346                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
46347            }
46348            WATER_DEPTH_DATA::ID => {
46349                WATER_DEPTH_DATA::deser(version, payload).map(Self::WATER_DEPTH)
46350            }
46351            WHEEL_DISTANCE_DATA::ID => {
46352                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
46353            }
46354            WIFI_CONFIG_AP_DATA::ID => {
46355                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
46356            }
46357            WINCH_STATUS_DATA::ID => {
46358                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
46359            }
46360            WIND_DATA::ID => WIND_DATA::deser(version, payload).map(Self::WIND),
46361            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
46362            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
46363        }
46364    }
46365    fn message_name(&self) -> &'static str {
46366        match self {
46367            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
46368            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
46369            Self::ADAP_TUNING(..) => ADAP_TUNING_DATA::NAME,
46370            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
46371            Self::AHRS(..) => AHRS_DATA::NAME,
46372            Self::AHRS2(..) => AHRS2_DATA::NAME,
46373            Self::AHRS3(..) => AHRS3_DATA::NAME,
46374            Self::AIRLINK_AUTH(..) => AIRLINK_AUTH_DATA::NAME,
46375            Self::AIRLINK_AUTH_RESPONSE(..) => AIRLINK_AUTH_RESPONSE_DATA::NAME,
46376            Self::AIRSPEED_AUTOCAL(..) => AIRSPEED_AUTOCAL_DATA::NAME,
46377            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
46378            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
46379            Self::AOA_SSA(..) => AOA_SSA_DATA::NAME,
46380            Self::AP_ADC(..) => AP_ADC_DATA::NAME,
46381            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
46382            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
46383            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
46384            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
46385            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
46386            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
46387            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
46388                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
46389            }
46390            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
46391            Self::AUTOPILOT_VERSION_REQUEST(..) => AUTOPILOT_VERSION_REQUEST_DATA::NAME,
46392            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
46393            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
46394            Self::BATTERY2(..) => BATTERY2_DATA::NAME,
46395            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
46396            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
46397            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
46398            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
46399            Self::CAMERA_FEEDBACK(..) => CAMERA_FEEDBACK_DATA::NAME,
46400            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
46401            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
46402            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
46403            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
46404            Self::CAMERA_STATUS(..) => CAMERA_STATUS_DATA::NAME,
46405            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
46406            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
46407            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
46408            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
46409            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
46410            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
46411            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
46412            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
46413            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
46414            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
46415            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
46416            Self::COLLISION(..) => COLLISION_DATA::NAME,
46417            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
46418            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
46419            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
46420            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
46421            Self::COMPASSMOT_STATUS(..) => COMPASSMOT_STATUS_DATA::NAME,
46422            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
46423            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
46424            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
46425            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
46426            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(..) => CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME,
46427            Self::CUBEPILOT_FIRMWARE_UPDATE_START(..) => CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME,
46428            Self::CUBEPILOT_RAW_RC(..) => CUBEPILOT_RAW_RC_DATA::NAME,
46429            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
46430            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
46431            Self::DATA16(..) => DATA16_DATA::NAME,
46432            Self::DATA32(..) => DATA32_DATA::NAME,
46433            Self::DATA64(..) => DATA64_DATA::NAME,
46434            Self::DATA96(..) => DATA96_DATA::NAME,
46435            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
46436            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
46437            Self::DEBUG(..) => DEBUG_DATA::NAME,
46438            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
46439            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
46440            Self::DEEPSTALL(..) => DEEPSTALL_DATA::NAME,
46441            Self::DEVICE_OP_READ(..) => DEVICE_OP_READ_DATA::NAME,
46442            Self::DEVICE_OP_READ_REPLY(..) => DEVICE_OP_READ_REPLY_DATA::NAME,
46443            Self::DEVICE_OP_WRITE(..) => DEVICE_OP_WRITE_DATA::NAME,
46444            Self::DEVICE_OP_WRITE_REPLY(..) => DEVICE_OP_WRITE_REPLY_DATA::NAME,
46445            Self::DIGICAM_CONFIGURE(..) => DIGICAM_CONFIGURE_DATA::NAME,
46446            Self::DIGICAM_CONTROL(..) => DIGICAM_CONTROL_DATA::NAME,
46447            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
46448            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
46449            Self::EKF_STATUS_REPORT(..) => EKF_STATUS_REPORT_DATA::NAME,
46450            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
46451            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
46452            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
46453            Self::ESC_TELEMETRY_13_TO_16(..) => ESC_TELEMETRY_13_TO_16_DATA::NAME,
46454            Self::ESC_TELEMETRY_17_TO_20(..) => ESC_TELEMETRY_17_TO_20_DATA::NAME,
46455            Self::ESC_TELEMETRY_1_TO_4(..) => ESC_TELEMETRY_1_TO_4_DATA::NAME,
46456            Self::ESC_TELEMETRY_21_TO_24(..) => ESC_TELEMETRY_21_TO_24_DATA::NAME,
46457            Self::ESC_TELEMETRY_25_TO_28(..) => ESC_TELEMETRY_25_TO_28_DATA::NAME,
46458            Self::ESC_TELEMETRY_29_TO_32(..) => ESC_TELEMETRY_29_TO_32_DATA::NAME,
46459            Self::ESC_TELEMETRY_5_TO_8(..) => ESC_TELEMETRY_5_TO_8_DATA::NAME,
46460            Self::ESC_TELEMETRY_9_TO_12(..) => ESC_TELEMETRY_9_TO_12_DATA::NAME,
46461            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
46462            Self::EVENT(..) => EVENT_DATA::NAME,
46463            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
46464            Self::FENCE_FETCH_POINT(..) => FENCE_FETCH_POINT_DATA::NAME,
46465            Self::FENCE_POINT(..) => FENCE_POINT_DATA::NAME,
46466            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
46467            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
46468            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
46469            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
46470            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
46471            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
46472            Self::GIMBAL_CONTROL(..) => GIMBAL_CONTROL_DATA::NAME,
46473            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
46474            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
46475            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
46476            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
46477            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
46478            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
46479                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
46480            }
46481            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
46482            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
46483            Self::GIMBAL_REPORT(..) => GIMBAL_REPORT_DATA::NAME,
46484            Self::GIMBAL_TORQUE_CMD_REPORT(..) => GIMBAL_TORQUE_CMD_REPORT_DATA::NAME,
46485            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
46486            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
46487            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
46488            Self::GOPRO_GET_REQUEST(..) => GOPRO_GET_REQUEST_DATA::NAME,
46489            Self::GOPRO_GET_RESPONSE(..) => GOPRO_GET_RESPONSE_DATA::NAME,
46490            Self::GOPRO_HEARTBEAT(..) => GOPRO_HEARTBEAT_DATA::NAME,
46491            Self::GOPRO_SET_REQUEST(..) => GOPRO_SET_REQUEST_DATA::NAME,
46492            Self::GOPRO_SET_RESPONSE(..) => GOPRO_SET_RESPONSE_DATA::NAME,
46493            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
46494            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
46495            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
46496            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
46497            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
46498            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
46499            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
46500            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
46501            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
46502            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
46503            Self::HERELINK_TELEM(..) => HERELINK_TELEM_DATA::NAME,
46504            Self::HERELINK_VIDEO_STREAM_INFORMATION(..) => {
46505                HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME
46506            }
46507            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
46508            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
46509            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
46510            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
46511            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
46512            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
46513            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
46514            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
46515            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
46516            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
46517            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
46518            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
46519            Self::HWSTATUS(..) => HWSTATUS_DATA::NAME,
46520            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
46521            Self::ICAROUS_HEARTBEAT(..) => ICAROUS_HEARTBEAT_DATA::NAME,
46522            Self::ICAROUS_KINEMATIC_BANDS(..) => ICAROUS_KINEMATIC_BANDS_DATA::NAME,
46523            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
46524            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
46525            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
46526            Self::LED_CONTROL(..) => LED_CONTROL_DATA::NAME,
46527            Self::LIMITS_STATUS(..) => LIMITS_STATUS_DATA::NAME,
46528            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
46529            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
46530            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
46531            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
46532                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
46533            }
46534            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
46535            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
46536            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
46537            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
46538            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
46539            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
46540            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
46541            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
46542            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
46543            Self::LOWEHEISER_GOV_EFI(..) => LOWEHEISER_GOV_EFI_DATA::NAME,
46544            Self::MAG_CAL_PROGRESS(..) => MAG_CAL_PROGRESS_DATA::NAME,
46545            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
46546            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
46547            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
46548            Self::MCU_STATUS(..) => MCU_STATUS_DATA::NAME,
46549            Self::MEMINFO(..) => MEMINFO_DATA::NAME,
46550            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
46551            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
46552            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
46553            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
46554            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
46555            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
46556            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
46557            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
46558            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
46559            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
46560            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
46561            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
46562            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
46563            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
46564            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
46565            Self::MOUNT_CONFIGURE(..) => MOUNT_CONFIGURE_DATA::NAME,
46566            Self::MOUNT_CONTROL(..) => MOUNT_CONTROL_DATA::NAME,
46567            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
46568            Self::MOUNT_STATUS(..) => MOUNT_STATUS_DATA::NAME,
46569            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
46570            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
46571            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
46572            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
46573            Self::OBSTACLE_DISTANCE_3D(..) => OBSTACLE_DISTANCE_3D_DATA::NAME,
46574            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
46575            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
46576            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
46577            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
46578            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
46579            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
46580            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
46581            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
46582            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
46583            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
46584            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
46585            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
46586            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
46587            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
46588            Self::OSD_PARAM_CONFIG(..) => OSD_PARAM_CONFIG_DATA::NAME,
46589            Self::OSD_PARAM_CONFIG_REPLY(..) => OSD_PARAM_CONFIG_REPLY_DATA::NAME,
46590            Self::OSD_PARAM_SHOW_CONFIG(..) => OSD_PARAM_SHOW_CONFIG_DATA::NAME,
46591            Self::OSD_PARAM_SHOW_CONFIG_REPLY(..) => OSD_PARAM_SHOW_CONFIG_REPLY_DATA::NAME,
46592            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
46593            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
46594            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
46595            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
46596            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
46597            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
46598            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
46599            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
46600            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
46601            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
46602            Self::PID_TUNING(..) => PID_TUNING_DATA::NAME,
46603            Self::PING(..) => PING_DATA::NAME,
46604            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
46605            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
46606            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
46607            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
46608            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
46609            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
46610            Self::RADIO(..) => RADIO_DATA::NAME,
46611            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
46612            Self::RALLY_FETCH_POINT(..) => RALLY_FETCH_POINT_DATA::NAME,
46613            Self::RALLY_POINT(..) => RALLY_POINT_DATA::NAME,
46614            Self::RANGEFINDER(..) => RANGEFINDER_DATA::NAME,
46615            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
46616            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
46617            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
46618            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
46619            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
46620            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
46621            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
46622            Self::REMOTE_LOG_BLOCK_STATUS(..) => REMOTE_LOG_BLOCK_STATUS_DATA::NAME,
46623            Self::REMOTE_LOG_DATA_BLOCK(..) => REMOTE_LOG_DATA_BLOCK_DATA::NAME,
46624            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
46625            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
46626            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
46627            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
46628            Self::RPM(..) => RPM_DATA::NAME,
46629            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
46630            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
46631            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
46632            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
46633            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
46634            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
46635            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
46636            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
46637            Self::SECURE_COMMAND(..) => SECURE_COMMAND_DATA::NAME,
46638            Self::SECURE_COMMAND_REPLY(..) => SECURE_COMMAND_REPLY_DATA::NAME,
46639            Self::SENSOR_OFFSETS(..) => SENSOR_OFFSETS_DATA::NAME,
46640            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
46641            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
46642            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
46643            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
46644            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
46645            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
46646            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
46647            Self::SET_MAG_OFFSETS(..) => SET_MAG_OFFSETS_DATA::NAME,
46648            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
46649            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
46650            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
46651            Self::SIMSTATE(..) => SIMSTATE_DATA::NAME,
46652            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
46653            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
46654            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
46655            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
46656            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
46657            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
46658            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
46659            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
46660            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
46661            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
46662            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
46663            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
46664            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
46665            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
46666                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
46667            }
46668            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
46669                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
46670            }
46671            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
46672            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
46673            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
46674            Self::UAVIONIX_ADSB_GET(..) => UAVIONIX_ADSB_GET_DATA::NAME,
46675            Self::UAVIONIX_ADSB_OUT_CFG(..) => UAVIONIX_ADSB_OUT_CFG_DATA::NAME,
46676            Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(..) => UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::NAME,
46677            Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(..) => {
46678                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::NAME
46679            }
46680            Self::UAVIONIX_ADSB_OUT_CONTROL(..) => UAVIONIX_ADSB_OUT_CONTROL_DATA::NAME,
46681            Self::UAVIONIX_ADSB_OUT_DYNAMIC(..) => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::NAME,
46682            Self::UAVIONIX_ADSB_OUT_STATUS(..) => UAVIONIX_ADSB_OUT_STATUS_DATA::NAME,
46683            Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(..) => {
46684                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::NAME
46685            }
46686            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
46687            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
46688            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
46689            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
46690            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
46691            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
46692            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
46693            Self::VISION_POSITION_DELTA(..) => VISION_POSITION_DELTA_DATA::NAME,
46694            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
46695            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
46696            Self::WATER_DEPTH(..) => WATER_DEPTH_DATA::NAME,
46697            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
46698            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
46699            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
46700            Self::WIND(..) => WIND_DATA::NAME,
46701            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
46702        }
46703    }
46704    fn message_id(&self) -> u32 {
46705        match self {
46706            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
46707            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
46708            Self::ADAP_TUNING(..) => ADAP_TUNING_DATA::ID,
46709            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
46710            Self::AHRS(..) => AHRS_DATA::ID,
46711            Self::AHRS2(..) => AHRS2_DATA::ID,
46712            Self::AHRS3(..) => AHRS3_DATA::ID,
46713            Self::AIRLINK_AUTH(..) => AIRLINK_AUTH_DATA::ID,
46714            Self::AIRLINK_AUTH_RESPONSE(..) => AIRLINK_AUTH_RESPONSE_DATA::ID,
46715            Self::AIRSPEED_AUTOCAL(..) => AIRSPEED_AUTOCAL_DATA::ID,
46716            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
46717            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
46718            Self::AOA_SSA(..) => AOA_SSA_DATA::ID,
46719            Self::AP_ADC(..) => AP_ADC_DATA::ID,
46720            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
46721            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
46722            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
46723            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
46724            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
46725            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
46726            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
46727                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
46728            }
46729            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
46730            Self::AUTOPILOT_VERSION_REQUEST(..) => AUTOPILOT_VERSION_REQUEST_DATA::ID,
46731            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
46732            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
46733            Self::BATTERY2(..) => BATTERY2_DATA::ID,
46734            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
46735            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
46736            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
46737            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
46738            Self::CAMERA_FEEDBACK(..) => CAMERA_FEEDBACK_DATA::ID,
46739            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
46740            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
46741            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
46742            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
46743            Self::CAMERA_STATUS(..) => CAMERA_STATUS_DATA::ID,
46744            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
46745            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
46746            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
46747            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
46748            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
46749            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
46750            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
46751            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
46752            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
46753            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
46754            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
46755            Self::COLLISION(..) => COLLISION_DATA::ID,
46756            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
46757            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
46758            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
46759            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
46760            Self::COMPASSMOT_STATUS(..) => COMPASSMOT_STATUS_DATA::ID,
46761            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
46762            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
46763            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
46764            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
46765            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(..) => CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID,
46766            Self::CUBEPILOT_FIRMWARE_UPDATE_START(..) => CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID,
46767            Self::CUBEPILOT_RAW_RC(..) => CUBEPILOT_RAW_RC_DATA::ID,
46768            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
46769            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
46770            Self::DATA16(..) => DATA16_DATA::ID,
46771            Self::DATA32(..) => DATA32_DATA::ID,
46772            Self::DATA64(..) => DATA64_DATA::ID,
46773            Self::DATA96(..) => DATA96_DATA::ID,
46774            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
46775            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
46776            Self::DEBUG(..) => DEBUG_DATA::ID,
46777            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
46778            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
46779            Self::DEEPSTALL(..) => DEEPSTALL_DATA::ID,
46780            Self::DEVICE_OP_READ(..) => DEVICE_OP_READ_DATA::ID,
46781            Self::DEVICE_OP_READ_REPLY(..) => DEVICE_OP_READ_REPLY_DATA::ID,
46782            Self::DEVICE_OP_WRITE(..) => DEVICE_OP_WRITE_DATA::ID,
46783            Self::DEVICE_OP_WRITE_REPLY(..) => DEVICE_OP_WRITE_REPLY_DATA::ID,
46784            Self::DIGICAM_CONFIGURE(..) => DIGICAM_CONFIGURE_DATA::ID,
46785            Self::DIGICAM_CONTROL(..) => DIGICAM_CONTROL_DATA::ID,
46786            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
46787            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
46788            Self::EKF_STATUS_REPORT(..) => EKF_STATUS_REPORT_DATA::ID,
46789            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
46790            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
46791            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
46792            Self::ESC_TELEMETRY_13_TO_16(..) => ESC_TELEMETRY_13_TO_16_DATA::ID,
46793            Self::ESC_TELEMETRY_17_TO_20(..) => ESC_TELEMETRY_17_TO_20_DATA::ID,
46794            Self::ESC_TELEMETRY_1_TO_4(..) => ESC_TELEMETRY_1_TO_4_DATA::ID,
46795            Self::ESC_TELEMETRY_21_TO_24(..) => ESC_TELEMETRY_21_TO_24_DATA::ID,
46796            Self::ESC_TELEMETRY_25_TO_28(..) => ESC_TELEMETRY_25_TO_28_DATA::ID,
46797            Self::ESC_TELEMETRY_29_TO_32(..) => ESC_TELEMETRY_29_TO_32_DATA::ID,
46798            Self::ESC_TELEMETRY_5_TO_8(..) => ESC_TELEMETRY_5_TO_8_DATA::ID,
46799            Self::ESC_TELEMETRY_9_TO_12(..) => ESC_TELEMETRY_9_TO_12_DATA::ID,
46800            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
46801            Self::EVENT(..) => EVENT_DATA::ID,
46802            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
46803            Self::FENCE_FETCH_POINT(..) => FENCE_FETCH_POINT_DATA::ID,
46804            Self::FENCE_POINT(..) => FENCE_POINT_DATA::ID,
46805            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
46806            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
46807            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
46808            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
46809            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
46810            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
46811            Self::GIMBAL_CONTROL(..) => GIMBAL_CONTROL_DATA::ID,
46812            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
46813            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
46814            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
46815            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
46816            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
46817            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
46818                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
46819            }
46820            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
46821            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
46822            Self::GIMBAL_REPORT(..) => GIMBAL_REPORT_DATA::ID,
46823            Self::GIMBAL_TORQUE_CMD_REPORT(..) => GIMBAL_TORQUE_CMD_REPORT_DATA::ID,
46824            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
46825            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
46826            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
46827            Self::GOPRO_GET_REQUEST(..) => GOPRO_GET_REQUEST_DATA::ID,
46828            Self::GOPRO_GET_RESPONSE(..) => GOPRO_GET_RESPONSE_DATA::ID,
46829            Self::GOPRO_HEARTBEAT(..) => GOPRO_HEARTBEAT_DATA::ID,
46830            Self::GOPRO_SET_REQUEST(..) => GOPRO_SET_REQUEST_DATA::ID,
46831            Self::GOPRO_SET_RESPONSE(..) => GOPRO_SET_RESPONSE_DATA::ID,
46832            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
46833            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
46834            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
46835            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
46836            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
46837            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
46838            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
46839            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
46840            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
46841            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
46842            Self::HERELINK_TELEM(..) => HERELINK_TELEM_DATA::ID,
46843            Self::HERELINK_VIDEO_STREAM_INFORMATION(..) => {
46844                HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID
46845            }
46846            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
46847            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
46848            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
46849            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
46850            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
46851            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
46852            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
46853            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
46854            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
46855            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
46856            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
46857            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
46858            Self::HWSTATUS(..) => HWSTATUS_DATA::ID,
46859            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
46860            Self::ICAROUS_HEARTBEAT(..) => ICAROUS_HEARTBEAT_DATA::ID,
46861            Self::ICAROUS_KINEMATIC_BANDS(..) => ICAROUS_KINEMATIC_BANDS_DATA::ID,
46862            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
46863            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
46864            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
46865            Self::LED_CONTROL(..) => LED_CONTROL_DATA::ID,
46866            Self::LIMITS_STATUS(..) => LIMITS_STATUS_DATA::ID,
46867            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
46868            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
46869            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
46870            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
46871                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
46872            }
46873            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
46874            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
46875            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
46876            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
46877            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
46878            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
46879            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
46880            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
46881            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
46882            Self::LOWEHEISER_GOV_EFI(..) => LOWEHEISER_GOV_EFI_DATA::ID,
46883            Self::MAG_CAL_PROGRESS(..) => MAG_CAL_PROGRESS_DATA::ID,
46884            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
46885            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
46886            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
46887            Self::MCU_STATUS(..) => MCU_STATUS_DATA::ID,
46888            Self::MEMINFO(..) => MEMINFO_DATA::ID,
46889            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
46890            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
46891            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
46892            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
46893            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
46894            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
46895            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
46896            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
46897            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
46898            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
46899            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
46900            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
46901            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
46902            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
46903            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
46904            Self::MOUNT_CONFIGURE(..) => MOUNT_CONFIGURE_DATA::ID,
46905            Self::MOUNT_CONTROL(..) => MOUNT_CONTROL_DATA::ID,
46906            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
46907            Self::MOUNT_STATUS(..) => MOUNT_STATUS_DATA::ID,
46908            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
46909            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
46910            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
46911            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
46912            Self::OBSTACLE_DISTANCE_3D(..) => OBSTACLE_DISTANCE_3D_DATA::ID,
46913            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
46914            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
46915            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
46916            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
46917            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
46918            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
46919            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
46920            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
46921            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
46922            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
46923            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
46924            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
46925            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
46926            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
46927            Self::OSD_PARAM_CONFIG(..) => OSD_PARAM_CONFIG_DATA::ID,
46928            Self::OSD_PARAM_CONFIG_REPLY(..) => OSD_PARAM_CONFIG_REPLY_DATA::ID,
46929            Self::OSD_PARAM_SHOW_CONFIG(..) => OSD_PARAM_SHOW_CONFIG_DATA::ID,
46930            Self::OSD_PARAM_SHOW_CONFIG_REPLY(..) => OSD_PARAM_SHOW_CONFIG_REPLY_DATA::ID,
46931            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
46932            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
46933            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
46934            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
46935            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
46936            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
46937            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
46938            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
46939            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
46940            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
46941            Self::PID_TUNING(..) => PID_TUNING_DATA::ID,
46942            Self::PING(..) => PING_DATA::ID,
46943            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
46944            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
46945            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
46946            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
46947            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
46948            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
46949            Self::RADIO(..) => RADIO_DATA::ID,
46950            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
46951            Self::RALLY_FETCH_POINT(..) => RALLY_FETCH_POINT_DATA::ID,
46952            Self::RALLY_POINT(..) => RALLY_POINT_DATA::ID,
46953            Self::RANGEFINDER(..) => RANGEFINDER_DATA::ID,
46954            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
46955            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
46956            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
46957            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
46958            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
46959            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
46960            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
46961            Self::REMOTE_LOG_BLOCK_STATUS(..) => REMOTE_LOG_BLOCK_STATUS_DATA::ID,
46962            Self::REMOTE_LOG_DATA_BLOCK(..) => REMOTE_LOG_DATA_BLOCK_DATA::ID,
46963            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
46964            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
46965            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
46966            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
46967            Self::RPM(..) => RPM_DATA::ID,
46968            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
46969            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
46970            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
46971            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
46972            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
46973            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
46974            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
46975            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
46976            Self::SECURE_COMMAND(..) => SECURE_COMMAND_DATA::ID,
46977            Self::SECURE_COMMAND_REPLY(..) => SECURE_COMMAND_REPLY_DATA::ID,
46978            Self::SENSOR_OFFSETS(..) => SENSOR_OFFSETS_DATA::ID,
46979            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
46980            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
46981            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
46982            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
46983            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
46984            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
46985            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
46986            Self::SET_MAG_OFFSETS(..) => SET_MAG_OFFSETS_DATA::ID,
46987            Self::SET_MODE(..) => SET_MODE_DATA::ID,
46988            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
46989            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
46990            Self::SIMSTATE(..) => SIMSTATE_DATA::ID,
46991            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
46992            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
46993            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
46994            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
46995            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
46996            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
46997            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
46998            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
46999            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
47000            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
47001            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
47002            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
47003            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
47004            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
47005            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
47006                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
47007            }
47008            Self::TUNNEL(..) => TUNNEL_DATA::ID,
47009            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
47010            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
47011            Self::UAVIONIX_ADSB_GET(..) => UAVIONIX_ADSB_GET_DATA::ID,
47012            Self::UAVIONIX_ADSB_OUT_CFG(..) => UAVIONIX_ADSB_OUT_CFG_DATA::ID,
47013            Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(..) => UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID,
47014            Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(..) => {
47015                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID
47016            }
47017            Self::UAVIONIX_ADSB_OUT_CONTROL(..) => UAVIONIX_ADSB_OUT_CONTROL_DATA::ID,
47018            Self::UAVIONIX_ADSB_OUT_DYNAMIC(..) => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID,
47019            Self::UAVIONIX_ADSB_OUT_STATUS(..) => UAVIONIX_ADSB_OUT_STATUS_DATA::ID,
47020            Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(..) => {
47021                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID
47022            }
47023            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
47024            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
47025            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
47026            Self::VIBRATION(..) => VIBRATION_DATA::ID,
47027            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
47028            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
47029            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
47030            Self::VISION_POSITION_DELTA(..) => VISION_POSITION_DELTA_DATA::ID,
47031            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
47032            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
47033            Self::WATER_DEPTH(..) => WATER_DEPTH_DATA::ID,
47034            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
47035            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
47036            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
47037            Self::WIND(..) => WIND_DATA::ID,
47038            Self::WIND_COV(..) => WIND_COV_DATA::ID,
47039        }
47040    }
47041    fn message_id_from_name(name: &str) -> Option<u32> {
47042        match name {
47043            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
47044            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
47045            ADAP_TUNING_DATA::NAME => Some(ADAP_TUNING_DATA::ID),
47046            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
47047            AHRS_DATA::NAME => Some(AHRS_DATA::ID),
47048            AHRS2_DATA::NAME => Some(AHRS2_DATA::ID),
47049            AHRS3_DATA::NAME => Some(AHRS3_DATA::ID),
47050            AIRLINK_AUTH_DATA::NAME => Some(AIRLINK_AUTH_DATA::ID),
47051            AIRLINK_AUTH_RESPONSE_DATA::NAME => Some(AIRLINK_AUTH_RESPONSE_DATA::ID),
47052            AIRSPEED_AUTOCAL_DATA::NAME => Some(AIRSPEED_AUTOCAL_DATA::ID),
47053            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
47054            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
47055            AOA_SSA_DATA::NAME => Some(AOA_SSA_DATA::ID),
47056            AP_ADC_DATA::NAME => Some(AP_ADC_DATA::ID),
47057            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
47058            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
47059            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
47060            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
47061            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
47062            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
47063            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
47064                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
47065            }
47066            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
47067            AUTOPILOT_VERSION_REQUEST_DATA::NAME => Some(AUTOPILOT_VERSION_REQUEST_DATA::ID),
47068            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
47069            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
47070            BATTERY2_DATA::NAME => Some(BATTERY2_DATA::ID),
47071            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
47072            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
47073            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
47074            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
47075            CAMERA_FEEDBACK_DATA::NAME => Some(CAMERA_FEEDBACK_DATA::ID),
47076            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
47077            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
47078            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
47079            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
47080            CAMERA_STATUS_DATA::NAME => Some(CAMERA_STATUS_DATA::ID),
47081            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
47082            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
47083            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
47084            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
47085            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
47086            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
47087            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
47088            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
47089            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
47090            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
47091            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
47092            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
47093            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
47094            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
47095            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
47096            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
47097            COMPASSMOT_STATUS_DATA::NAME => Some(COMPASSMOT_STATUS_DATA::ID),
47098            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
47099            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
47100            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
47101            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
47102            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME => {
47103                Some(CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID)
47104            }
47105            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME => {
47106                Some(CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID)
47107            }
47108            CUBEPILOT_RAW_RC_DATA::NAME => Some(CUBEPILOT_RAW_RC_DATA::ID),
47109            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
47110            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
47111            DATA16_DATA::NAME => Some(DATA16_DATA::ID),
47112            DATA32_DATA::NAME => Some(DATA32_DATA::ID),
47113            DATA64_DATA::NAME => Some(DATA64_DATA::ID),
47114            DATA96_DATA::NAME => Some(DATA96_DATA::ID),
47115            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
47116            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
47117            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
47118            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
47119            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
47120            DEEPSTALL_DATA::NAME => Some(DEEPSTALL_DATA::ID),
47121            DEVICE_OP_READ_DATA::NAME => Some(DEVICE_OP_READ_DATA::ID),
47122            DEVICE_OP_READ_REPLY_DATA::NAME => Some(DEVICE_OP_READ_REPLY_DATA::ID),
47123            DEVICE_OP_WRITE_DATA::NAME => Some(DEVICE_OP_WRITE_DATA::ID),
47124            DEVICE_OP_WRITE_REPLY_DATA::NAME => Some(DEVICE_OP_WRITE_REPLY_DATA::ID),
47125            DIGICAM_CONFIGURE_DATA::NAME => Some(DIGICAM_CONFIGURE_DATA::ID),
47126            DIGICAM_CONTROL_DATA::NAME => Some(DIGICAM_CONTROL_DATA::ID),
47127            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
47128            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
47129            EKF_STATUS_REPORT_DATA::NAME => Some(EKF_STATUS_REPORT_DATA::ID),
47130            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
47131            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
47132            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
47133            ESC_TELEMETRY_13_TO_16_DATA::NAME => Some(ESC_TELEMETRY_13_TO_16_DATA::ID),
47134            ESC_TELEMETRY_17_TO_20_DATA::NAME => Some(ESC_TELEMETRY_17_TO_20_DATA::ID),
47135            ESC_TELEMETRY_1_TO_4_DATA::NAME => Some(ESC_TELEMETRY_1_TO_4_DATA::ID),
47136            ESC_TELEMETRY_21_TO_24_DATA::NAME => Some(ESC_TELEMETRY_21_TO_24_DATA::ID),
47137            ESC_TELEMETRY_25_TO_28_DATA::NAME => Some(ESC_TELEMETRY_25_TO_28_DATA::ID),
47138            ESC_TELEMETRY_29_TO_32_DATA::NAME => Some(ESC_TELEMETRY_29_TO_32_DATA::ID),
47139            ESC_TELEMETRY_5_TO_8_DATA::NAME => Some(ESC_TELEMETRY_5_TO_8_DATA::ID),
47140            ESC_TELEMETRY_9_TO_12_DATA::NAME => Some(ESC_TELEMETRY_9_TO_12_DATA::ID),
47141            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
47142            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
47143            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
47144            FENCE_FETCH_POINT_DATA::NAME => Some(FENCE_FETCH_POINT_DATA::ID),
47145            FENCE_POINT_DATA::NAME => Some(FENCE_POINT_DATA::ID),
47146            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
47147            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
47148            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
47149            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
47150            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
47151            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
47152            GIMBAL_CONTROL_DATA::NAME => Some(GIMBAL_CONTROL_DATA::ID),
47153            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
47154                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
47155            }
47156            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
47157            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
47158            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
47159            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
47160            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
47161                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
47162            }
47163            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
47164            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
47165            GIMBAL_REPORT_DATA::NAME => Some(GIMBAL_REPORT_DATA::ID),
47166            GIMBAL_TORQUE_CMD_REPORT_DATA::NAME => Some(GIMBAL_TORQUE_CMD_REPORT_DATA::ID),
47167            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
47168            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
47169            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
47170                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
47171            }
47172            GOPRO_GET_REQUEST_DATA::NAME => Some(GOPRO_GET_REQUEST_DATA::ID),
47173            GOPRO_GET_RESPONSE_DATA::NAME => Some(GOPRO_GET_RESPONSE_DATA::ID),
47174            GOPRO_HEARTBEAT_DATA::NAME => Some(GOPRO_HEARTBEAT_DATA::ID),
47175            GOPRO_SET_REQUEST_DATA::NAME => Some(GOPRO_SET_REQUEST_DATA::ID),
47176            GOPRO_SET_RESPONSE_DATA::NAME => Some(GOPRO_SET_RESPONSE_DATA::ID),
47177            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
47178            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
47179            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
47180            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
47181            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
47182            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
47183            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
47184            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
47185            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
47186            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
47187            HERELINK_TELEM_DATA::NAME => Some(HERELINK_TELEM_DATA::ID),
47188            HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME => {
47189                Some(HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID)
47190            }
47191            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
47192            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
47193            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
47194            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
47195            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
47196            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
47197            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
47198            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
47199            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
47200            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
47201            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
47202            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
47203            HWSTATUS_DATA::NAME => Some(HWSTATUS_DATA::ID),
47204            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
47205            ICAROUS_HEARTBEAT_DATA::NAME => Some(ICAROUS_HEARTBEAT_DATA::ID),
47206            ICAROUS_KINEMATIC_BANDS_DATA::NAME => Some(ICAROUS_KINEMATIC_BANDS_DATA::ID),
47207            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
47208            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
47209            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
47210            LED_CONTROL_DATA::NAME => Some(LED_CONTROL_DATA::ID),
47211            LIMITS_STATUS_DATA::NAME => Some(LIMITS_STATUS_DATA::ID),
47212            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
47213            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
47214            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
47215            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
47216                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
47217            }
47218            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
47219            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
47220            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
47221            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
47222            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
47223            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
47224            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
47225            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
47226            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
47227            LOWEHEISER_GOV_EFI_DATA::NAME => Some(LOWEHEISER_GOV_EFI_DATA::ID),
47228            MAG_CAL_PROGRESS_DATA::NAME => Some(MAG_CAL_PROGRESS_DATA::ID),
47229            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
47230            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
47231            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
47232            MCU_STATUS_DATA::NAME => Some(MCU_STATUS_DATA::ID),
47233            MEMINFO_DATA::NAME => Some(MEMINFO_DATA::ID),
47234            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
47235            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
47236            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
47237            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
47238            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
47239            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
47240            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
47241            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
47242            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
47243            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
47244            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
47245            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
47246            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
47247            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
47248            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
47249            MOUNT_CONFIGURE_DATA::NAME => Some(MOUNT_CONFIGURE_DATA::ID),
47250            MOUNT_CONTROL_DATA::NAME => Some(MOUNT_CONTROL_DATA::ID),
47251            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
47252            MOUNT_STATUS_DATA::NAME => Some(MOUNT_STATUS_DATA::ID),
47253            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
47254            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
47255            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
47256            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
47257            OBSTACLE_DISTANCE_3D_DATA::NAME => Some(OBSTACLE_DISTANCE_3D_DATA::ID),
47258            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
47259            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
47260            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
47261            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
47262            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
47263            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
47264            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
47265            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
47266            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
47267            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
47268            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
47269            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
47270            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
47271            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
47272            OSD_PARAM_CONFIG_DATA::NAME => Some(OSD_PARAM_CONFIG_DATA::ID),
47273            OSD_PARAM_CONFIG_REPLY_DATA::NAME => Some(OSD_PARAM_CONFIG_REPLY_DATA::ID),
47274            OSD_PARAM_SHOW_CONFIG_DATA::NAME => Some(OSD_PARAM_SHOW_CONFIG_DATA::ID),
47275            OSD_PARAM_SHOW_CONFIG_REPLY_DATA::NAME => Some(OSD_PARAM_SHOW_CONFIG_REPLY_DATA::ID),
47276            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
47277            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
47278            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
47279            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
47280            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
47281            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
47282            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
47283            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
47284            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
47285            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
47286            PID_TUNING_DATA::NAME => Some(PID_TUNING_DATA::ID),
47287            PING_DATA::NAME => Some(PING_DATA::ID),
47288            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
47289            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
47290            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
47291            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
47292            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
47293            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
47294            RADIO_DATA::NAME => Some(RADIO_DATA::ID),
47295            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
47296            RALLY_FETCH_POINT_DATA::NAME => Some(RALLY_FETCH_POINT_DATA::ID),
47297            RALLY_POINT_DATA::NAME => Some(RALLY_POINT_DATA::ID),
47298            RANGEFINDER_DATA::NAME => Some(RANGEFINDER_DATA::ID),
47299            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
47300            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
47301            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
47302            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
47303            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
47304            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
47305            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
47306            REMOTE_LOG_BLOCK_STATUS_DATA::NAME => Some(REMOTE_LOG_BLOCK_STATUS_DATA::ID),
47307            REMOTE_LOG_DATA_BLOCK_DATA::NAME => Some(REMOTE_LOG_DATA_BLOCK_DATA::ID),
47308            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
47309            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
47310            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
47311            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
47312            RPM_DATA::NAME => Some(RPM_DATA::ID),
47313            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
47314            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
47315            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
47316            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
47317            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
47318            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
47319            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
47320            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
47321            SECURE_COMMAND_DATA::NAME => Some(SECURE_COMMAND_DATA::ID),
47322            SECURE_COMMAND_REPLY_DATA::NAME => Some(SECURE_COMMAND_REPLY_DATA::ID),
47323            SENSOR_OFFSETS_DATA::NAME => Some(SENSOR_OFFSETS_DATA::ID),
47324            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
47325            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
47326            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
47327            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
47328            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
47329            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
47330            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
47331            SET_MAG_OFFSETS_DATA::NAME => Some(SET_MAG_OFFSETS_DATA::ID),
47332            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
47333            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
47334                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
47335            }
47336            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
47337                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
47338            }
47339            SIMSTATE_DATA::NAME => Some(SIMSTATE_DATA::ID),
47340            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
47341            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
47342            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
47343            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
47344            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
47345            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
47346            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
47347            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
47348            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
47349            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
47350            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
47351            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
47352            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
47353            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
47354                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
47355            }
47356            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
47357                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
47358            }
47359            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
47360            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
47361            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
47362            UAVIONIX_ADSB_GET_DATA::NAME => Some(UAVIONIX_ADSB_GET_DATA::ID),
47363            UAVIONIX_ADSB_OUT_CFG_DATA::NAME => Some(UAVIONIX_ADSB_OUT_CFG_DATA::ID),
47364            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::NAME => {
47365                Some(UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID)
47366            }
47367            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::NAME => {
47368                Some(UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID)
47369            }
47370            UAVIONIX_ADSB_OUT_CONTROL_DATA::NAME => Some(UAVIONIX_ADSB_OUT_CONTROL_DATA::ID),
47371            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::NAME => Some(UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID),
47372            UAVIONIX_ADSB_OUT_STATUS_DATA::NAME => Some(UAVIONIX_ADSB_OUT_STATUS_DATA::ID),
47373            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::NAME => {
47374                Some(UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID)
47375            }
47376            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
47377            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
47378            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
47379            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
47380            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
47381            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
47382            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
47383            VISION_POSITION_DELTA_DATA::NAME => Some(VISION_POSITION_DELTA_DATA::ID),
47384            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
47385            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
47386            WATER_DEPTH_DATA::NAME => Some(WATER_DEPTH_DATA::ID),
47387            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
47388            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
47389            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
47390            WIND_DATA::NAME => Some(WIND_DATA::ID),
47391            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
47392            _ => None,
47393        }
47394    }
47395    fn default_message_from_id(id: u32) -> Option<Self> {
47396        match id {
47397            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
47398                ACTUATOR_CONTROL_TARGET_DATA::default(),
47399            )),
47400            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
47401                ACTUATOR_OUTPUT_STATUS_DATA::default(),
47402            )),
47403            ADAP_TUNING_DATA::ID => Some(Self::ADAP_TUNING(ADAP_TUNING_DATA::default())),
47404            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
47405            AHRS_DATA::ID => Some(Self::AHRS(AHRS_DATA::default())),
47406            AHRS2_DATA::ID => Some(Self::AHRS2(AHRS2_DATA::default())),
47407            AHRS3_DATA::ID => Some(Self::AHRS3(AHRS3_DATA::default())),
47408            AIRLINK_AUTH_DATA::ID => Some(Self::AIRLINK_AUTH(AIRLINK_AUTH_DATA::default())),
47409            AIRLINK_AUTH_RESPONSE_DATA::ID => Some(Self::AIRLINK_AUTH_RESPONSE(
47410                AIRLINK_AUTH_RESPONSE_DATA::default(),
47411            )),
47412            AIRSPEED_AUTOCAL_DATA::ID => {
47413                Some(Self::AIRSPEED_AUTOCAL(AIRSPEED_AUTOCAL_DATA::default()))
47414            }
47415            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
47416            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
47417            AOA_SSA_DATA::ID => Some(Self::AOA_SSA(AOA_SSA_DATA::default())),
47418            AP_ADC_DATA::ID => Some(Self::AP_ADC(AP_ADC_DATA::default())),
47419            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
47420            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
47421                ATTITUDE_QUATERNION_DATA::default(),
47422            )),
47423            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
47424                ATTITUDE_QUATERNION_COV_DATA::default(),
47425            )),
47426            ATTITUDE_TARGET_DATA::ID => {
47427                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
47428            }
47429            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
47430            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
47431            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
47432                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
47433                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
47434                ))
47435            }
47436            AUTOPILOT_VERSION_DATA::ID => {
47437                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
47438            }
47439            AUTOPILOT_VERSION_REQUEST_DATA::ID => Some(Self::AUTOPILOT_VERSION_REQUEST(
47440                AUTOPILOT_VERSION_REQUEST_DATA::default(),
47441            )),
47442            AVAILABLE_MODES_DATA::ID => {
47443                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
47444            }
47445            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
47446                AVAILABLE_MODES_MONITOR_DATA::default(),
47447            )),
47448            BATTERY2_DATA::ID => Some(Self::BATTERY2(BATTERY2_DATA::default())),
47449            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
47450            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
47451            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
47452            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
47453                CAMERA_CAPTURE_STATUS_DATA::default(),
47454            )),
47455            CAMERA_FEEDBACK_DATA::ID => {
47456                Some(Self::CAMERA_FEEDBACK(CAMERA_FEEDBACK_DATA::default()))
47457            }
47458            CAMERA_FOV_STATUS_DATA::ID => {
47459                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
47460            }
47461            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
47462                CAMERA_IMAGE_CAPTURED_DATA::default(),
47463            )),
47464            CAMERA_INFORMATION_DATA::ID => {
47465                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
47466            }
47467            CAMERA_SETTINGS_DATA::ID => {
47468                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
47469            }
47470            CAMERA_STATUS_DATA::ID => Some(Self::CAMERA_STATUS(CAMERA_STATUS_DATA::default())),
47471            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
47472                CAMERA_THERMAL_RANGE_DATA::default(),
47473            )),
47474            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
47475                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
47476            )),
47477            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
47478                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
47479            )),
47480            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
47481            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
47482            CAN_FILTER_MODIFY_DATA::ID => {
47483                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
47484            }
47485            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
47486            CELLULAR_CONFIG_DATA::ID => {
47487                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
47488            }
47489            CELLULAR_STATUS_DATA::ID => {
47490                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
47491            }
47492            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
47493                CHANGE_OPERATOR_CONTROL_DATA::default(),
47494            )),
47495            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
47496                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
47497            )),
47498            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
47499            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
47500            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
47501            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
47502            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
47503            COMPASSMOT_STATUS_DATA::ID => {
47504                Some(Self::COMPASSMOT_STATUS(COMPASSMOT_STATUS_DATA::default()))
47505            }
47506            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
47507                COMPONENT_INFORMATION_DATA::default(),
47508            )),
47509            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
47510                COMPONENT_INFORMATION_BASIC_DATA::default(),
47511            )),
47512            COMPONENT_METADATA_DATA::ID => {
47513                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
47514            }
47515            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
47516                CONTROL_SYSTEM_STATE_DATA::default(),
47517            )),
47518            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => Some(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(
47519                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::default(),
47520            )),
47521            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
47522                Some(Self::CUBEPILOT_FIRMWARE_UPDATE_START(
47523                    CUBEPILOT_FIRMWARE_UPDATE_START_DATA::default(),
47524                ))
47525            }
47526            CUBEPILOT_RAW_RC_DATA::ID => {
47527                Some(Self::CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA::default()))
47528            }
47529            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
47530                CURRENT_EVENT_SEQUENCE_DATA::default(),
47531            )),
47532            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
47533            DATA16_DATA::ID => Some(Self::DATA16(DATA16_DATA::default())),
47534            DATA32_DATA::ID => Some(Self::DATA32(DATA32_DATA::default())),
47535            DATA64_DATA::ID => Some(Self::DATA64(DATA64_DATA::default())),
47536            DATA96_DATA::ID => Some(Self::DATA96(DATA96_DATA::default())),
47537            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
47538            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
47539                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
47540            )),
47541            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
47542            DEBUG_FLOAT_ARRAY_DATA::ID => {
47543                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
47544            }
47545            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
47546            DEEPSTALL_DATA::ID => Some(Self::DEEPSTALL(DEEPSTALL_DATA::default())),
47547            DEVICE_OP_READ_DATA::ID => Some(Self::DEVICE_OP_READ(DEVICE_OP_READ_DATA::default())),
47548            DEVICE_OP_READ_REPLY_DATA::ID => Some(Self::DEVICE_OP_READ_REPLY(
47549                DEVICE_OP_READ_REPLY_DATA::default(),
47550            )),
47551            DEVICE_OP_WRITE_DATA::ID => {
47552                Some(Self::DEVICE_OP_WRITE(DEVICE_OP_WRITE_DATA::default()))
47553            }
47554            DEVICE_OP_WRITE_REPLY_DATA::ID => Some(Self::DEVICE_OP_WRITE_REPLY(
47555                DEVICE_OP_WRITE_REPLY_DATA::default(),
47556            )),
47557            DIGICAM_CONFIGURE_DATA::ID => {
47558                Some(Self::DIGICAM_CONFIGURE(DIGICAM_CONFIGURE_DATA::default()))
47559            }
47560            DIGICAM_CONTROL_DATA::ID => {
47561                Some(Self::DIGICAM_CONTROL(DIGICAM_CONTROL_DATA::default()))
47562            }
47563            DISTANCE_SENSOR_DATA::ID => {
47564                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
47565            }
47566            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
47567            EKF_STATUS_REPORT_DATA::ID => {
47568                Some(Self::EKF_STATUS_REPORT(EKF_STATUS_REPORT_DATA::default()))
47569            }
47570            ENCAPSULATED_DATA_DATA::ID => {
47571                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
47572            }
47573            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
47574            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
47575            ESC_TELEMETRY_13_TO_16_DATA::ID => Some(Self::ESC_TELEMETRY_13_TO_16(
47576                ESC_TELEMETRY_13_TO_16_DATA::default(),
47577            )),
47578            ESC_TELEMETRY_17_TO_20_DATA::ID => Some(Self::ESC_TELEMETRY_17_TO_20(
47579                ESC_TELEMETRY_17_TO_20_DATA::default(),
47580            )),
47581            ESC_TELEMETRY_1_TO_4_DATA::ID => Some(Self::ESC_TELEMETRY_1_TO_4(
47582                ESC_TELEMETRY_1_TO_4_DATA::default(),
47583            )),
47584            ESC_TELEMETRY_21_TO_24_DATA::ID => Some(Self::ESC_TELEMETRY_21_TO_24(
47585                ESC_TELEMETRY_21_TO_24_DATA::default(),
47586            )),
47587            ESC_TELEMETRY_25_TO_28_DATA::ID => Some(Self::ESC_TELEMETRY_25_TO_28(
47588                ESC_TELEMETRY_25_TO_28_DATA::default(),
47589            )),
47590            ESC_TELEMETRY_29_TO_32_DATA::ID => Some(Self::ESC_TELEMETRY_29_TO_32(
47591                ESC_TELEMETRY_29_TO_32_DATA::default(),
47592            )),
47593            ESC_TELEMETRY_5_TO_8_DATA::ID => Some(Self::ESC_TELEMETRY_5_TO_8(
47594                ESC_TELEMETRY_5_TO_8_DATA::default(),
47595            )),
47596            ESC_TELEMETRY_9_TO_12_DATA::ID => Some(Self::ESC_TELEMETRY_9_TO_12(
47597                ESC_TELEMETRY_9_TO_12_DATA::default(),
47598            )),
47599            ESTIMATOR_STATUS_DATA::ID => {
47600                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
47601            }
47602            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
47603            EXTENDED_SYS_STATE_DATA::ID => {
47604                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
47605            }
47606            FENCE_FETCH_POINT_DATA::ID => {
47607                Some(Self::FENCE_FETCH_POINT(FENCE_FETCH_POINT_DATA::default()))
47608            }
47609            FENCE_POINT_DATA::ID => Some(Self::FENCE_POINT(FENCE_POINT_DATA::default())),
47610            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
47611            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
47612                FILE_TRANSFER_PROTOCOL_DATA::default(),
47613            )),
47614            FLIGHT_INFORMATION_DATA::ID => {
47615                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
47616            }
47617            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
47618            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
47619            GENERATOR_STATUS_DATA::ID => {
47620                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
47621            }
47622            GIMBAL_CONTROL_DATA::ID => Some(Self::GIMBAL_CONTROL(GIMBAL_CONTROL_DATA::default())),
47623            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
47624                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
47625            )),
47626            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
47627                GIMBAL_DEVICE_INFORMATION_DATA::default(),
47628            )),
47629            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
47630                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
47631            )),
47632            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
47633                GIMBAL_MANAGER_INFORMATION_DATA::default(),
47634            )),
47635            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
47636                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
47637            )),
47638            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
47639                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
47640                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
47641                ))
47642            }
47643            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
47644                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
47645            )),
47646            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
47647                GIMBAL_MANAGER_STATUS_DATA::default(),
47648            )),
47649            GIMBAL_REPORT_DATA::ID => Some(Self::GIMBAL_REPORT(GIMBAL_REPORT_DATA::default())),
47650            GIMBAL_TORQUE_CMD_REPORT_DATA::ID => Some(Self::GIMBAL_TORQUE_CMD_REPORT(
47651                GIMBAL_TORQUE_CMD_REPORT_DATA::default(),
47652            )),
47653            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
47654                GLOBAL_POSITION_INT_DATA::default(),
47655            )),
47656            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
47657                GLOBAL_POSITION_INT_COV_DATA::default(),
47658            )),
47659            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
47660                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
47661                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
47662                ))
47663            }
47664            GOPRO_GET_REQUEST_DATA::ID => {
47665                Some(Self::GOPRO_GET_REQUEST(GOPRO_GET_REQUEST_DATA::default()))
47666            }
47667            GOPRO_GET_RESPONSE_DATA::ID => {
47668                Some(Self::GOPRO_GET_RESPONSE(GOPRO_GET_RESPONSE_DATA::default()))
47669            }
47670            GOPRO_HEARTBEAT_DATA::ID => {
47671                Some(Self::GOPRO_HEARTBEAT(GOPRO_HEARTBEAT_DATA::default()))
47672            }
47673            GOPRO_SET_REQUEST_DATA::ID => {
47674                Some(Self::GOPRO_SET_REQUEST(GOPRO_SET_REQUEST_DATA::default()))
47675            }
47676            GOPRO_SET_RESPONSE_DATA::ID => {
47677                Some(Self::GOPRO_SET_RESPONSE(GOPRO_SET_RESPONSE_DATA::default()))
47678            }
47679            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
47680            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
47681            GPS_GLOBAL_ORIGIN_DATA::ID => {
47682                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
47683            }
47684            GPS_INJECT_DATA_DATA::ID => {
47685                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
47686            }
47687            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
47688            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
47689            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
47690            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
47691            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
47692            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
47693            HERELINK_TELEM_DATA::ID => Some(Self::HERELINK_TELEM(HERELINK_TELEM_DATA::default())),
47694            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
47695                Some(Self::HERELINK_VIDEO_STREAM_INFORMATION(
47696                    HERELINK_VIDEO_STREAM_INFORMATION_DATA::default(),
47697                ))
47698            }
47699            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
47700            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
47701            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
47702            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
47703                HIL_ACTUATOR_CONTROLS_DATA::default(),
47704            )),
47705            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
47706            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
47707            HIL_OPTICAL_FLOW_DATA::ID => {
47708                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
47709            }
47710            HIL_RC_INPUTS_RAW_DATA::ID => {
47711                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
47712            }
47713            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
47714            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
47715            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
47716                HIL_STATE_QUATERNION_DATA::default(),
47717            )),
47718            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
47719            HWSTATUS_DATA::ID => Some(Self::HWSTATUS(HWSTATUS_DATA::default())),
47720            HYGROMETER_SENSOR_DATA::ID => {
47721                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
47722            }
47723            ICAROUS_HEARTBEAT_DATA::ID => {
47724                Some(Self::ICAROUS_HEARTBEAT(ICAROUS_HEARTBEAT_DATA::default()))
47725            }
47726            ICAROUS_KINEMATIC_BANDS_DATA::ID => Some(Self::ICAROUS_KINEMATIC_BANDS(
47727                ICAROUS_KINEMATIC_BANDS_DATA::default(),
47728            )),
47729            ILLUMINATOR_STATUS_DATA::ID => {
47730                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
47731            }
47732            ISBD_LINK_STATUS_DATA::ID => {
47733                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
47734            }
47735            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
47736            LED_CONTROL_DATA::ID => Some(Self::LED_CONTROL(LED_CONTROL_DATA::default())),
47737            LIMITS_STATUS_DATA::ID => Some(Self::LIMITS_STATUS(LIMITS_STATUS_DATA::default())),
47738            LINK_NODE_STATUS_DATA::ID => {
47739                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
47740            }
47741            LOCAL_POSITION_NED_DATA::ID => {
47742                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
47743            }
47744            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
47745                LOCAL_POSITION_NED_COV_DATA::default(),
47746            )),
47747            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
47748                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
47749                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
47750                ))
47751            }
47752            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
47753            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
47754            LOGGING_DATA_ACKED_DATA::ID => {
47755                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
47756            }
47757            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
47758            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
47759            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
47760            LOG_REQUEST_DATA_DATA::ID => {
47761                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
47762            }
47763            LOG_REQUEST_END_DATA::ID => {
47764                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
47765            }
47766            LOG_REQUEST_LIST_DATA::ID => {
47767                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
47768            }
47769            LOWEHEISER_GOV_EFI_DATA::ID => {
47770                Some(Self::LOWEHEISER_GOV_EFI(LOWEHEISER_GOV_EFI_DATA::default()))
47771            }
47772            MAG_CAL_PROGRESS_DATA::ID => {
47773                Some(Self::MAG_CAL_PROGRESS(MAG_CAL_PROGRESS_DATA::default()))
47774            }
47775            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
47776            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
47777            MANUAL_SETPOINT_DATA::ID => {
47778                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
47779            }
47780            MCU_STATUS_DATA::ID => Some(Self::MCU_STATUS(MCU_STATUS_DATA::default())),
47781            MEMINFO_DATA::ID => Some(Self::MEMINFO(MEMINFO_DATA::default())),
47782            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
47783            MESSAGE_INTERVAL_DATA::ID => {
47784                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
47785            }
47786            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
47787            MISSION_CLEAR_ALL_DATA::ID => {
47788                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
47789            }
47790            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
47791            MISSION_CURRENT_DATA::ID => {
47792                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
47793            }
47794            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
47795            MISSION_ITEM_INT_DATA::ID => {
47796                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
47797            }
47798            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
47799                MISSION_ITEM_REACHED_DATA::default(),
47800            )),
47801            MISSION_REQUEST_DATA::ID => {
47802                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
47803            }
47804            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
47805                MISSION_REQUEST_INT_DATA::default(),
47806            )),
47807            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
47808                MISSION_REQUEST_LIST_DATA::default(),
47809            )),
47810            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
47811                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
47812            )),
47813            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
47814                MISSION_SET_CURRENT_DATA::default(),
47815            )),
47816            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
47817                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
47818            )),
47819            MOUNT_CONFIGURE_DATA::ID => {
47820                Some(Self::MOUNT_CONFIGURE(MOUNT_CONFIGURE_DATA::default()))
47821            }
47822            MOUNT_CONTROL_DATA::ID => Some(Self::MOUNT_CONTROL(MOUNT_CONTROL_DATA::default())),
47823            MOUNT_ORIENTATION_DATA::ID => {
47824                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
47825            }
47826            MOUNT_STATUS_DATA::ID => Some(Self::MOUNT_STATUS(MOUNT_STATUS_DATA::default())),
47827            NAMED_VALUE_FLOAT_DATA::ID => {
47828                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
47829            }
47830            NAMED_VALUE_INT_DATA::ID => {
47831                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
47832            }
47833            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
47834                NAV_CONTROLLER_OUTPUT_DATA::default(),
47835            )),
47836            OBSTACLE_DISTANCE_DATA::ID => {
47837                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
47838            }
47839            OBSTACLE_DISTANCE_3D_DATA::ID => Some(Self::OBSTACLE_DISTANCE_3D(
47840                OBSTACLE_DISTANCE_3D_DATA::default(),
47841            )),
47842            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
47843            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
47844                ONBOARD_COMPUTER_STATUS_DATA::default(),
47845            )),
47846            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
47847                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
47848            )),
47849            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
47850                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
47851            )),
47852            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
47853                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
47854            )),
47855            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
47856                OPEN_DRONE_ID_LOCATION_DATA::default(),
47857            )),
47858            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
47859                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
47860            )),
47861            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
47862                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
47863            )),
47864            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
47865                OPEN_DRONE_ID_SELF_ID_DATA::default(),
47866            )),
47867            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
47868                OPEN_DRONE_ID_SYSTEM_DATA::default(),
47869            )),
47870            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
47871                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
47872            )),
47873            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
47874            OPTICAL_FLOW_RAD_DATA::ID => {
47875                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
47876            }
47877            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
47878                ORBIT_EXECUTION_STATUS_DATA::default(),
47879            )),
47880            OSD_PARAM_CONFIG_DATA::ID => {
47881                Some(Self::OSD_PARAM_CONFIG(OSD_PARAM_CONFIG_DATA::default()))
47882            }
47883            OSD_PARAM_CONFIG_REPLY_DATA::ID => Some(Self::OSD_PARAM_CONFIG_REPLY(
47884                OSD_PARAM_CONFIG_REPLY_DATA::default(),
47885            )),
47886            OSD_PARAM_SHOW_CONFIG_DATA::ID => Some(Self::OSD_PARAM_SHOW_CONFIG(
47887                OSD_PARAM_SHOW_CONFIG_DATA::default(),
47888            )),
47889            OSD_PARAM_SHOW_CONFIG_REPLY_DATA::ID => Some(Self::OSD_PARAM_SHOW_CONFIG_REPLY(
47890                OSD_PARAM_SHOW_CONFIG_REPLY_DATA::default(),
47891            )),
47892            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
47893            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
47894                PARAM_EXT_REQUEST_LIST_DATA::default(),
47895            )),
47896            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
47897                PARAM_EXT_REQUEST_READ_DATA::default(),
47898            )),
47899            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
47900            PARAM_EXT_VALUE_DATA::ID => {
47901                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
47902            }
47903            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
47904            PARAM_REQUEST_LIST_DATA::ID => {
47905                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
47906            }
47907            PARAM_REQUEST_READ_DATA::ID => {
47908                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
47909            }
47910            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
47911            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
47912            PID_TUNING_DATA::ID => Some(Self::PID_TUNING(PID_TUNING_DATA::default())),
47913            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
47914            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
47915            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
47916            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
47917                POSITION_TARGET_GLOBAL_INT_DATA::default(),
47918            )),
47919            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
47920                POSITION_TARGET_LOCAL_NED_DATA::default(),
47921            )),
47922            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
47923            PROTOCOL_VERSION_DATA::ID => {
47924                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
47925            }
47926            RADIO_DATA::ID => Some(Self::RADIO(RADIO_DATA::default())),
47927            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
47928            RALLY_FETCH_POINT_DATA::ID => {
47929                Some(Self::RALLY_FETCH_POINT(RALLY_FETCH_POINT_DATA::default()))
47930            }
47931            RALLY_POINT_DATA::ID => Some(Self::RALLY_POINT(RALLY_POINT_DATA::default())),
47932            RANGEFINDER_DATA::ID => Some(Self::RANGEFINDER(RANGEFINDER_DATA::default())),
47933            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
47934            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
47935            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
47936            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
47937            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
47938                RC_CHANNELS_OVERRIDE_DATA::default(),
47939            )),
47940            RC_CHANNELS_RAW_DATA::ID => {
47941                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
47942            }
47943            RC_CHANNELS_SCALED_DATA::ID => {
47944                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
47945            }
47946            REMOTE_LOG_BLOCK_STATUS_DATA::ID => Some(Self::REMOTE_LOG_BLOCK_STATUS(
47947                REMOTE_LOG_BLOCK_STATUS_DATA::default(),
47948            )),
47949            REMOTE_LOG_DATA_BLOCK_DATA::ID => Some(Self::REMOTE_LOG_DATA_BLOCK(
47950                REMOTE_LOG_DATA_BLOCK_DATA::default(),
47951            )),
47952            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
47953                REQUEST_DATA_STREAM_DATA::default(),
47954            )),
47955            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
47956            RESOURCE_REQUEST_DATA::ID => {
47957                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
47958            }
47959            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
47960                RESPONSE_EVENT_ERROR_DATA::default(),
47961            )),
47962            RPM_DATA::ID => Some(Self::RPM(RPM_DATA::default())),
47963            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
47964                SAFETY_ALLOWED_AREA_DATA::default(),
47965            )),
47966            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
47967                SAFETY_SET_ALLOWED_AREA_DATA::default(),
47968            )),
47969            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
47970            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
47971            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
47972            SCALED_PRESSURE_DATA::ID => {
47973                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
47974            }
47975            SCALED_PRESSURE2_DATA::ID => {
47976                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
47977            }
47978            SCALED_PRESSURE3_DATA::ID => {
47979                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
47980            }
47981            SECURE_COMMAND_DATA::ID => Some(Self::SECURE_COMMAND(SECURE_COMMAND_DATA::default())),
47982            SECURE_COMMAND_REPLY_DATA::ID => Some(Self::SECURE_COMMAND_REPLY(
47983                SECURE_COMMAND_REPLY_DATA::default(),
47984            )),
47985            SENSOR_OFFSETS_DATA::ID => Some(Self::SENSOR_OFFSETS(SENSOR_OFFSETS_DATA::default())),
47986            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
47987            SERVO_OUTPUT_RAW_DATA::ID => {
47988                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
47989            }
47990            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
47991            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
47992                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
47993            )),
47994            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
47995                SET_ATTITUDE_TARGET_DATA::default(),
47996            )),
47997            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
47998                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
47999            )),
48000            SET_HOME_POSITION_DATA::ID => {
48001                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
48002            }
48003            SET_MAG_OFFSETS_DATA::ID => {
48004                Some(Self::SET_MAG_OFFSETS(SET_MAG_OFFSETS_DATA::default()))
48005            }
48006            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
48007            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
48008                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
48009            )),
48010            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
48011                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
48012            )),
48013            SIMSTATE_DATA::ID => Some(Self::SIMSTATE(SIMSTATE_DATA::default())),
48014            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
48015            SMART_BATTERY_INFO_DATA::ID => {
48016                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
48017            }
48018            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
48019            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
48020                STORAGE_INFORMATION_DATA::default(),
48021            )),
48022            SUPPORTED_TUNES_DATA::ID => {
48023                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
48024            }
48025            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
48026            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
48027            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
48028            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
48029            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
48030            TERRAIN_REQUEST_DATA::ID => {
48031                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
48032            }
48033            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
48034            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
48035                TIME_ESTIMATE_TO_TARGET_DATA::default(),
48036            )),
48037            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
48038                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
48039                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
48040                ))
48041            }
48042            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
48043                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
48044                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
48045                ))
48046            }
48047            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
48048            UAVCAN_NODE_INFO_DATA::ID => {
48049                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
48050            }
48051            UAVCAN_NODE_STATUS_DATA::ID => {
48052                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
48053            }
48054            UAVIONIX_ADSB_GET_DATA::ID => {
48055                Some(Self::UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA::default()))
48056            }
48057            UAVIONIX_ADSB_OUT_CFG_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG(
48058                UAVIONIX_ADSB_OUT_CFG_DATA::default(),
48059            )),
48060            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(
48061                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::default(),
48062            )),
48063            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
48064                Some(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(
48065                    UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::default(),
48066                ))
48067            }
48068            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CONTROL(
48069                UAVIONIX_ADSB_OUT_CONTROL_DATA::default(),
48070            )),
48071            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_DYNAMIC(
48072                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::default(),
48073            )),
48074            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_STATUS(
48075                UAVIONIX_ADSB_OUT_STATUS_DATA::default(),
48076            )),
48077            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
48078                Some(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(
48079                    UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::default(),
48080                ))
48081            }
48082            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
48083                UTM_GLOBAL_POSITION_DATA::default(),
48084            )),
48085            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
48086            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
48087            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
48088            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
48089                VICON_POSITION_ESTIMATE_DATA::default(),
48090            )),
48091            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
48092                VIDEO_STREAM_INFORMATION_DATA::default(),
48093            )),
48094            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
48095                VIDEO_STREAM_STATUS_DATA::default(),
48096            )),
48097            VISION_POSITION_DELTA_DATA::ID => Some(Self::VISION_POSITION_DELTA(
48098                VISION_POSITION_DELTA_DATA::default(),
48099            )),
48100            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
48101                VISION_POSITION_ESTIMATE_DATA::default(),
48102            )),
48103            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
48104                VISION_SPEED_ESTIMATE_DATA::default(),
48105            )),
48106            WATER_DEPTH_DATA::ID => Some(Self::WATER_DEPTH(WATER_DEPTH_DATA::default())),
48107            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
48108            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
48109            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
48110            WIND_DATA::ID => Some(Self::WIND(WIND_DATA::default())),
48111            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
48112            _ => None,
48113        }
48114    }
48115    #[cfg(feature = "arbitrary")]
48116    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
48117        match id {
48118            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
48119                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
48120            )),
48121            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
48122                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
48123            )),
48124            ADAP_TUNING_DATA::ID => Some(Self::ADAP_TUNING(ADAP_TUNING_DATA::random(rng))),
48125            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
48126            AHRS_DATA::ID => Some(Self::AHRS(AHRS_DATA::random(rng))),
48127            AHRS2_DATA::ID => Some(Self::AHRS2(AHRS2_DATA::random(rng))),
48128            AHRS3_DATA::ID => Some(Self::AHRS3(AHRS3_DATA::random(rng))),
48129            AIRLINK_AUTH_DATA::ID => Some(Self::AIRLINK_AUTH(AIRLINK_AUTH_DATA::random(rng))),
48130            AIRLINK_AUTH_RESPONSE_DATA::ID => Some(Self::AIRLINK_AUTH_RESPONSE(
48131                AIRLINK_AUTH_RESPONSE_DATA::random(rng),
48132            )),
48133            AIRSPEED_AUTOCAL_DATA::ID => {
48134                Some(Self::AIRSPEED_AUTOCAL(AIRSPEED_AUTOCAL_DATA::random(rng)))
48135            }
48136            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
48137            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
48138            AOA_SSA_DATA::ID => Some(Self::AOA_SSA(AOA_SSA_DATA::random(rng))),
48139            AP_ADC_DATA::ID => Some(Self::AP_ADC(AP_ADC_DATA::random(rng))),
48140            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
48141            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
48142                ATTITUDE_QUATERNION_DATA::random(rng),
48143            )),
48144            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
48145                ATTITUDE_QUATERNION_COV_DATA::random(rng),
48146            )),
48147            ATTITUDE_TARGET_DATA::ID => {
48148                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
48149            }
48150            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
48151            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
48152            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
48153                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
48154                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
48155                ))
48156            }
48157            AUTOPILOT_VERSION_DATA::ID => {
48158                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
48159            }
48160            AUTOPILOT_VERSION_REQUEST_DATA::ID => Some(Self::AUTOPILOT_VERSION_REQUEST(
48161                AUTOPILOT_VERSION_REQUEST_DATA::random(rng),
48162            )),
48163            AVAILABLE_MODES_DATA::ID => {
48164                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
48165            }
48166            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
48167                AVAILABLE_MODES_MONITOR_DATA::random(rng),
48168            )),
48169            BATTERY2_DATA::ID => Some(Self::BATTERY2(BATTERY2_DATA::random(rng))),
48170            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
48171            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
48172            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
48173            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
48174                CAMERA_CAPTURE_STATUS_DATA::random(rng),
48175            )),
48176            CAMERA_FEEDBACK_DATA::ID => {
48177                Some(Self::CAMERA_FEEDBACK(CAMERA_FEEDBACK_DATA::random(rng)))
48178            }
48179            CAMERA_FOV_STATUS_DATA::ID => {
48180                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
48181            }
48182            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
48183                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
48184            )),
48185            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
48186                CAMERA_INFORMATION_DATA::random(rng),
48187            )),
48188            CAMERA_SETTINGS_DATA::ID => {
48189                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
48190            }
48191            CAMERA_STATUS_DATA::ID => Some(Self::CAMERA_STATUS(CAMERA_STATUS_DATA::random(rng))),
48192            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
48193                CAMERA_THERMAL_RANGE_DATA::random(rng),
48194            )),
48195            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
48196                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
48197            )),
48198            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
48199                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
48200            )),
48201            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
48202            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
48203            CAN_FILTER_MODIFY_DATA::ID => {
48204                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
48205            }
48206            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
48207            CELLULAR_CONFIG_DATA::ID => {
48208                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
48209            }
48210            CELLULAR_STATUS_DATA::ID => {
48211                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
48212            }
48213            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
48214                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
48215            )),
48216            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
48217                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
48218            )),
48219            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
48220            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
48221            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
48222            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
48223            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
48224            COMPASSMOT_STATUS_DATA::ID => {
48225                Some(Self::COMPASSMOT_STATUS(COMPASSMOT_STATUS_DATA::random(rng)))
48226            }
48227            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
48228                COMPONENT_INFORMATION_DATA::random(rng),
48229            )),
48230            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
48231                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
48232            )),
48233            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
48234                COMPONENT_METADATA_DATA::random(rng),
48235            )),
48236            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
48237                CONTROL_SYSTEM_STATE_DATA::random(rng),
48238            )),
48239            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => Some(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(
48240                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::random(rng),
48241            )),
48242            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
48243                Some(Self::CUBEPILOT_FIRMWARE_UPDATE_START(
48244                    CUBEPILOT_FIRMWARE_UPDATE_START_DATA::random(rng),
48245                ))
48246            }
48247            CUBEPILOT_RAW_RC_DATA::ID => {
48248                Some(Self::CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA::random(rng)))
48249            }
48250            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
48251                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
48252            )),
48253            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
48254            DATA16_DATA::ID => Some(Self::DATA16(DATA16_DATA::random(rng))),
48255            DATA32_DATA::ID => Some(Self::DATA32(DATA32_DATA::random(rng))),
48256            DATA64_DATA::ID => Some(Self::DATA64(DATA64_DATA::random(rng))),
48257            DATA96_DATA::ID => Some(Self::DATA96(DATA96_DATA::random(rng))),
48258            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
48259            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
48260                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
48261            )),
48262            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
48263            DEBUG_FLOAT_ARRAY_DATA::ID => {
48264                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
48265            }
48266            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
48267            DEEPSTALL_DATA::ID => Some(Self::DEEPSTALL(DEEPSTALL_DATA::random(rng))),
48268            DEVICE_OP_READ_DATA::ID => Some(Self::DEVICE_OP_READ(DEVICE_OP_READ_DATA::random(rng))),
48269            DEVICE_OP_READ_REPLY_DATA::ID => Some(Self::DEVICE_OP_READ_REPLY(
48270                DEVICE_OP_READ_REPLY_DATA::random(rng),
48271            )),
48272            DEVICE_OP_WRITE_DATA::ID => {
48273                Some(Self::DEVICE_OP_WRITE(DEVICE_OP_WRITE_DATA::random(rng)))
48274            }
48275            DEVICE_OP_WRITE_REPLY_DATA::ID => Some(Self::DEVICE_OP_WRITE_REPLY(
48276                DEVICE_OP_WRITE_REPLY_DATA::random(rng),
48277            )),
48278            DIGICAM_CONFIGURE_DATA::ID => {
48279                Some(Self::DIGICAM_CONFIGURE(DIGICAM_CONFIGURE_DATA::random(rng)))
48280            }
48281            DIGICAM_CONTROL_DATA::ID => {
48282                Some(Self::DIGICAM_CONTROL(DIGICAM_CONTROL_DATA::random(rng)))
48283            }
48284            DISTANCE_SENSOR_DATA::ID => {
48285                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
48286            }
48287            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
48288            EKF_STATUS_REPORT_DATA::ID => {
48289                Some(Self::EKF_STATUS_REPORT(EKF_STATUS_REPORT_DATA::random(rng)))
48290            }
48291            ENCAPSULATED_DATA_DATA::ID => {
48292                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
48293            }
48294            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
48295            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
48296            ESC_TELEMETRY_13_TO_16_DATA::ID => Some(Self::ESC_TELEMETRY_13_TO_16(
48297                ESC_TELEMETRY_13_TO_16_DATA::random(rng),
48298            )),
48299            ESC_TELEMETRY_17_TO_20_DATA::ID => Some(Self::ESC_TELEMETRY_17_TO_20(
48300                ESC_TELEMETRY_17_TO_20_DATA::random(rng),
48301            )),
48302            ESC_TELEMETRY_1_TO_4_DATA::ID => Some(Self::ESC_TELEMETRY_1_TO_4(
48303                ESC_TELEMETRY_1_TO_4_DATA::random(rng),
48304            )),
48305            ESC_TELEMETRY_21_TO_24_DATA::ID => Some(Self::ESC_TELEMETRY_21_TO_24(
48306                ESC_TELEMETRY_21_TO_24_DATA::random(rng),
48307            )),
48308            ESC_TELEMETRY_25_TO_28_DATA::ID => Some(Self::ESC_TELEMETRY_25_TO_28(
48309                ESC_TELEMETRY_25_TO_28_DATA::random(rng),
48310            )),
48311            ESC_TELEMETRY_29_TO_32_DATA::ID => Some(Self::ESC_TELEMETRY_29_TO_32(
48312                ESC_TELEMETRY_29_TO_32_DATA::random(rng),
48313            )),
48314            ESC_TELEMETRY_5_TO_8_DATA::ID => Some(Self::ESC_TELEMETRY_5_TO_8(
48315                ESC_TELEMETRY_5_TO_8_DATA::random(rng),
48316            )),
48317            ESC_TELEMETRY_9_TO_12_DATA::ID => Some(Self::ESC_TELEMETRY_9_TO_12(
48318                ESC_TELEMETRY_9_TO_12_DATA::random(rng),
48319            )),
48320            ESTIMATOR_STATUS_DATA::ID => {
48321                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
48322            }
48323            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
48324            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
48325                EXTENDED_SYS_STATE_DATA::random(rng),
48326            )),
48327            FENCE_FETCH_POINT_DATA::ID => {
48328                Some(Self::FENCE_FETCH_POINT(FENCE_FETCH_POINT_DATA::random(rng)))
48329            }
48330            FENCE_POINT_DATA::ID => Some(Self::FENCE_POINT(FENCE_POINT_DATA::random(rng))),
48331            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
48332            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
48333                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
48334            )),
48335            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
48336                FLIGHT_INFORMATION_DATA::random(rng),
48337            )),
48338            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
48339            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
48340            GENERATOR_STATUS_DATA::ID => {
48341                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
48342            }
48343            GIMBAL_CONTROL_DATA::ID => Some(Self::GIMBAL_CONTROL(GIMBAL_CONTROL_DATA::random(rng))),
48344            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
48345                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
48346            )),
48347            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
48348                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
48349            )),
48350            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
48351                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
48352            )),
48353            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
48354                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
48355            )),
48356            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
48357                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
48358            )),
48359            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
48360                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
48361                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
48362                ))
48363            }
48364            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
48365                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
48366            )),
48367            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
48368                GIMBAL_MANAGER_STATUS_DATA::random(rng),
48369            )),
48370            GIMBAL_REPORT_DATA::ID => Some(Self::GIMBAL_REPORT(GIMBAL_REPORT_DATA::random(rng))),
48371            GIMBAL_TORQUE_CMD_REPORT_DATA::ID => Some(Self::GIMBAL_TORQUE_CMD_REPORT(
48372                GIMBAL_TORQUE_CMD_REPORT_DATA::random(rng),
48373            )),
48374            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
48375                GLOBAL_POSITION_INT_DATA::random(rng),
48376            )),
48377            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
48378                GLOBAL_POSITION_INT_COV_DATA::random(rng),
48379            )),
48380            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
48381                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
48382                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
48383                ))
48384            }
48385            GOPRO_GET_REQUEST_DATA::ID => {
48386                Some(Self::GOPRO_GET_REQUEST(GOPRO_GET_REQUEST_DATA::random(rng)))
48387            }
48388            GOPRO_GET_RESPONSE_DATA::ID => Some(Self::GOPRO_GET_RESPONSE(
48389                GOPRO_GET_RESPONSE_DATA::random(rng),
48390            )),
48391            GOPRO_HEARTBEAT_DATA::ID => {
48392                Some(Self::GOPRO_HEARTBEAT(GOPRO_HEARTBEAT_DATA::random(rng)))
48393            }
48394            GOPRO_SET_REQUEST_DATA::ID => {
48395                Some(Self::GOPRO_SET_REQUEST(GOPRO_SET_REQUEST_DATA::random(rng)))
48396            }
48397            GOPRO_SET_RESPONSE_DATA::ID => Some(Self::GOPRO_SET_RESPONSE(
48398                GOPRO_SET_RESPONSE_DATA::random(rng),
48399            )),
48400            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
48401            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
48402            GPS_GLOBAL_ORIGIN_DATA::ID => {
48403                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
48404            }
48405            GPS_INJECT_DATA_DATA::ID => {
48406                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
48407            }
48408            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
48409            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
48410            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
48411            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
48412            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
48413            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
48414            HERELINK_TELEM_DATA::ID => Some(Self::HERELINK_TELEM(HERELINK_TELEM_DATA::random(rng))),
48415            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
48416                Some(Self::HERELINK_VIDEO_STREAM_INFORMATION(
48417                    HERELINK_VIDEO_STREAM_INFORMATION_DATA::random(rng),
48418                ))
48419            }
48420            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
48421            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
48422            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
48423            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
48424                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
48425            )),
48426            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
48427            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
48428            HIL_OPTICAL_FLOW_DATA::ID => {
48429                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
48430            }
48431            HIL_RC_INPUTS_RAW_DATA::ID => {
48432                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
48433            }
48434            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
48435            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
48436            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
48437                HIL_STATE_QUATERNION_DATA::random(rng),
48438            )),
48439            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
48440            HWSTATUS_DATA::ID => Some(Self::HWSTATUS(HWSTATUS_DATA::random(rng))),
48441            HYGROMETER_SENSOR_DATA::ID => {
48442                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
48443            }
48444            ICAROUS_HEARTBEAT_DATA::ID => {
48445                Some(Self::ICAROUS_HEARTBEAT(ICAROUS_HEARTBEAT_DATA::random(rng)))
48446            }
48447            ICAROUS_KINEMATIC_BANDS_DATA::ID => Some(Self::ICAROUS_KINEMATIC_BANDS(
48448                ICAROUS_KINEMATIC_BANDS_DATA::random(rng),
48449            )),
48450            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
48451                ILLUMINATOR_STATUS_DATA::random(rng),
48452            )),
48453            ISBD_LINK_STATUS_DATA::ID => {
48454                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
48455            }
48456            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
48457            LED_CONTROL_DATA::ID => Some(Self::LED_CONTROL(LED_CONTROL_DATA::random(rng))),
48458            LIMITS_STATUS_DATA::ID => Some(Self::LIMITS_STATUS(LIMITS_STATUS_DATA::random(rng))),
48459            LINK_NODE_STATUS_DATA::ID => {
48460                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
48461            }
48462            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
48463                LOCAL_POSITION_NED_DATA::random(rng),
48464            )),
48465            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
48466                LOCAL_POSITION_NED_COV_DATA::random(rng),
48467            )),
48468            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
48469                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
48470                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
48471                ))
48472            }
48473            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
48474            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
48475            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
48476                LOGGING_DATA_ACKED_DATA::random(rng),
48477            )),
48478            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
48479            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
48480            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
48481            LOG_REQUEST_DATA_DATA::ID => {
48482                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
48483            }
48484            LOG_REQUEST_END_DATA::ID => {
48485                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
48486            }
48487            LOG_REQUEST_LIST_DATA::ID => {
48488                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
48489            }
48490            LOWEHEISER_GOV_EFI_DATA::ID => Some(Self::LOWEHEISER_GOV_EFI(
48491                LOWEHEISER_GOV_EFI_DATA::random(rng),
48492            )),
48493            MAG_CAL_PROGRESS_DATA::ID => {
48494                Some(Self::MAG_CAL_PROGRESS(MAG_CAL_PROGRESS_DATA::random(rng)))
48495            }
48496            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
48497            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
48498            MANUAL_SETPOINT_DATA::ID => {
48499                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
48500            }
48501            MCU_STATUS_DATA::ID => Some(Self::MCU_STATUS(MCU_STATUS_DATA::random(rng))),
48502            MEMINFO_DATA::ID => Some(Self::MEMINFO(MEMINFO_DATA::random(rng))),
48503            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
48504            MESSAGE_INTERVAL_DATA::ID => {
48505                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
48506            }
48507            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
48508            MISSION_CLEAR_ALL_DATA::ID => {
48509                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
48510            }
48511            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
48512            MISSION_CURRENT_DATA::ID => {
48513                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
48514            }
48515            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
48516            MISSION_ITEM_INT_DATA::ID => {
48517                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
48518            }
48519            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
48520                MISSION_ITEM_REACHED_DATA::random(rng),
48521            )),
48522            MISSION_REQUEST_DATA::ID => {
48523                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
48524            }
48525            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
48526                MISSION_REQUEST_INT_DATA::random(rng),
48527            )),
48528            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
48529                MISSION_REQUEST_LIST_DATA::random(rng),
48530            )),
48531            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
48532                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
48533            )),
48534            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
48535                MISSION_SET_CURRENT_DATA::random(rng),
48536            )),
48537            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
48538                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
48539            )),
48540            MOUNT_CONFIGURE_DATA::ID => {
48541                Some(Self::MOUNT_CONFIGURE(MOUNT_CONFIGURE_DATA::random(rng)))
48542            }
48543            MOUNT_CONTROL_DATA::ID => Some(Self::MOUNT_CONTROL(MOUNT_CONTROL_DATA::random(rng))),
48544            MOUNT_ORIENTATION_DATA::ID => {
48545                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
48546            }
48547            MOUNT_STATUS_DATA::ID => Some(Self::MOUNT_STATUS(MOUNT_STATUS_DATA::random(rng))),
48548            NAMED_VALUE_FLOAT_DATA::ID => {
48549                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
48550            }
48551            NAMED_VALUE_INT_DATA::ID => {
48552                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
48553            }
48554            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
48555                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
48556            )),
48557            OBSTACLE_DISTANCE_DATA::ID => {
48558                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
48559            }
48560            OBSTACLE_DISTANCE_3D_DATA::ID => Some(Self::OBSTACLE_DISTANCE_3D(
48561                OBSTACLE_DISTANCE_3D_DATA::random(rng),
48562            )),
48563            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
48564            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
48565                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
48566            )),
48567            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
48568                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
48569            )),
48570            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
48571                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
48572            )),
48573            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
48574                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
48575            )),
48576            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
48577                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
48578            )),
48579            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
48580                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
48581            )),
48582            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
48583                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
48584            )),
48585            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
48586                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
48587            )),
48588            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
48589                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
48590            )),
48591            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
48592                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
48593            )),
48594            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
48595            OPTICAL_FLOW_RAD_DATA::ID => {
48596                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
48597            }
48598            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
48599                ORBIT_EXECUTION_STATUS_DATA::random(rng),
48600            )),
48601            OSD_PARAM_CONFIG_DATA::ID => {
48602                Some(Self::OSD_PARAM_CONFIG(OSD_PARAM_CONFIG_DATA::random(rng)))
48603            }
48604            OSD_PARAM_CONFIG_REPLY_DATA::ID => Some(Self::OSD_PARAM_CONFIG_REPLY(
48605                OSD_PARAM_CONFIG_REPLY_DATA::random(rng),
48606            )),
48607            OSD_PARAM_SHOW_CONFIG_DATA::ID => Some(Self::OSD_PARAM_SHOW_CONFIG(
48608                OSD_PARAM_SHOW_CONFIG_DATA::random(rng),
48609            )),
48610            OSD_PARAM_SHOW_CONFIG_REPLY_DATA::ID => Some(Self::OSD_PARAM_SHOW_CONFIG_REPLY(
48611                OSD_PARAM_SHOW_CONFIG_REPLY_DATA::random(rng),
48612            )),
48613            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
48614            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
48615                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
48616            )),
48617            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
48618                PARAM_EXT_REQUEST_READ_DATA::random(rng),
48619            )),
48620            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
48621            PARAM_EXT_VALUE_DATA::ID => {
48622                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
48623            }
48624            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
48625            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
48626                PARAM_REQUEST_LIST_DATA::random(rng),
48627            )),
48628            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
48629                PARAM_REQUEST_READ_DATA::random(rng),
48630            )),
48631            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
48632            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
48633            PID_TUNING_DATA::ID => Some(Self::PID_TUNING(PID_TUNING_DATA::random(rng))),
48634            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
48635            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
48636            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
48637            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
48638                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
48639            )),
48640            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
48641                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
48642            )),
48643            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
48644            PROTOCOL_VERSION_DATA::ID => {
48645                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
48646            }
48647            RADIO_DATA::ID => Some(Self::RADIO(RADIO_DATA::random(rng))),
48648            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
48649            RALLY_FETCH_POINT_DATA::ID => {
48650                Some(Self::RALLY_FETCH_POINT(RALLY_FETCH_POINT_DATA::random(rng)))
48651            }
48652            RALLY_POINT_DATA::ID => Some(Self::RALLY_POINT(RALLY_POINT_DATA::random(rng))),
48653            RANGEFINDER_DATA::ID => Some(Self::RANGEFINDER(RANGEFINDER_DATA::random(rng))),
48654            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
48655            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
48656            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
48657            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
48658            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
48659                RC_CHANNELS_OVERRIDE_DATA::random(rng),
48660            )),
48661            RC_CHANNELS_RAW_DATA::ID => {
48662                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
48663            }
48664            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
48665                RC_CHANNELS_SCALED_DATA::random(rng),
48666            )),
48667            REMOTE_LOG_BLOCK_STATUS_DATA::ID => Some(Self::REMOTE_LOG_BLOCK_STATUS(
48668                REMOTE_LOG_BLOCK_STATUS_DATA::random(rng),
48669            )),
48670            REMOTE_LOG_DATA_BLOCK_DATA::ID => Some(Self::REMOTE_LOG_DATA_BLOCK(
48671                REMOTE_LOG_DATA_BLOCK_DATA::random(rng),
48672            )),
48673            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
48674                REQUEST_DATA_STREAM_DATA::random(rng),
48675            )),
48676            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
48677            RESOURCE_REQUEST_DATA::ID => {
48678                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
48679            }
48680            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
48681                RESPONSE_EVENT_ERROR_DATA::random(rng),
48682            )),
48683            RPM_DATA::ID => Some(Self::RPM(RPM_DATA::random(rng))),
48684            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
48685                SAFETY_ALLOWED_AREA_DATA::random(rng),
48686            )),
48687            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
48688                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
48689            )),
48690            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
48691            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
48692            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
48693            SCALED_PRESSURE_DATA::ID => {
48694                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
48695            }
48696            SCALED_PRESSURE2_DATA::ID => {
48697                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
48698            }
48699            SCALED_PRESSURE3_DATA::ID => {
48700                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
48701            }
48702            SECURE_COMMAND_DATA::ID => Some(Self::SECURE_COMMAND(SECURE_COMMAND_DATA::random(rng))),
48703            SECURE_COMMAND_REPLY_DATA::ID => Some(Self::SECURE_COMMAND_REPLY(
48704                SECURE_COMMAND_REPLY_DATA::random(rng),
48705            )),
48706            SENSOR_OFFSETS_DATA::ID => Some(Self::SENSOR_OFFSETS(SENSOR_OFFSETS_DATA::random(rng))),
48707            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
48708            SERVO_OUTPUT_RAW_DATA::ID => {
48709                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
48710            }
48711            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
48712            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
48713                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
48714            )),
48715            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
48716                SET_ATTITUDE_TARGET_DATA::random(rng),
48717            )),
48718            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
48719                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
48720            )),
48721            SET_HOME_POSITION_DATA::ID => {
48722                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
48723            }
48724            SET_MAG_OFFSETS_DATA::ID => {
48725                Some(Self::SET_MAG_OFFSETS(SET_MAG_OFFSETS_DATA::random(rng)))
48726            }
48727            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
48728            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
48729                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
48730            )),
48731            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
48732                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
48733            )),
48734            SIMSTATE_DATA::ID => Some(Self::SIMSTATE(SIMSTATE_DATA::random(rng))),
48735            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
48736            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
48737                SMART_BATTERY_INFO_DATA::random(rng),
48738            )),
48739            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
48740            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
48741                STORAGE_INFORMATION_DATA::random(rng),
48742            )),
48743            SUPPORTED_TUNES_DATA::ID => {
48744                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
48745            }
48746            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
48747            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
48748            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
48749            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
48750            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
48751            TERRAIN_REQUEST_DATA::ID => {
48752                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
48753            }
48754            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
48755            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
48756                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
48757            )),
48758            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
48759                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
48760                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
48761                ))
48762            }
48763            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
48764                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
48765                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
48766                ))
48767            }
48768            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
48769            UAVCAN_NODE_INFO_DATA::ID => {
48770                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
48771            }
48772            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
48773                UAVCAN_NODE_STATUS_DATA::random(rng),
48774            )),
48775            UAVIONIX_ADSB_GET_DATA::ID => {
48776                Some(Self::UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA::random(rng)))
48777            }
48778            UAVIONIX_ADSB_OUT_CFG_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG(
48779                UAVIONIX_ADSB_OUT_CFG_DATA::random(rng),
48780            )),
48781            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(
48782                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::random(rng),
48783            )),
48784            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
48785                Some(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(
48786                    UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::random(rng),
48787                ))
48788            }
48789            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CONTROL(
48790                UAVIONIX_ADSB_OUT_CONTROL_DATA::random(rng),
48791            )),
48792            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_DYNAMIC(
48793                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::random(rng),
48794            )),
48795            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_STATUS(
48796                UAVIONIX_ADSB_OUT_STATUS_DATA::random(rng),
48797            )),
48798            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
48799                Some(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(
48800                    UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::random(rng),
48801                ))
48802            }
48803            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
48804                UTM_GLOBAL_POSITION_DATA::random(rng),
48805            )),
48806            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
48807            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
48808            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
48809            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
48810                VICON_POSITION_ESTIMATE_DATA::random(rng),
48811            )),
48812            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
48813                VIDEO_STREAM_INFORMATION_DATA::random(rng),
48814            )),
48815            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
48816                VIDEO_STREAM_STATUS_DATA::random(rng),
48817            )),
48818            VISION_POSITION_DELTA_DATA::ID => Some(Self::VISION_POSITION_DELTA(
48819                VISION_POSITION_DELTA_DATA::random(rng),
48820            )),
48821            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
48822                VISION_POSITION_ESTIMATE_DATA::random(rng),
48823            )),
48824            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
48825                VISION_SPEED_ESTIMATE_DATA::random(rng),
48826            )),
48827            WATER_DEPTH_DATA::ID => Some(Self::WATER_DEPTH(WATER_DEPTH_DATA::random(rng))),
48828            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
48829            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
48830            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
48831            WIND_DATA::ID => Some(Self::WIND(WIND_DATA::random(rng))),
48832            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
48833            _ => None,
48834        }
48835    }
48836    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
48837        match self {
48838            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
48839            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
48840            Self::ADAP_TUNING(body) => body.ser(version, bytes),
48841            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
48842            Self::AHRS(body) => body.ser(version, bytes),
48843            Self::AHRS2(body) => body.ser(version, bytes),
48844            Self::AHRS3(body) => body.ser(version, bytes),
48845            Self::AIRLINK_AUTH(body) => body.ser(version, bytes),
48846            Self::AIRLINK_AUTH_RESPONSE(body) => body.ser(version, bytes),
48847            Self::AIRSPEED_AUTOCAL(body) => body.ser(version, bytes),
48848            Self::AIS_VESSEL(body) => body.ser(version, bytes),
48849            Self::ALTITUDE(body) => body.ser(version, bytes),
48850            Self::AOA_SSA(body) => body.ser(version, bytes),
48851            Self::AP_ADC(body) => body.ser(version, bytes),
48852            Self::ATTITUDE(body) => body.ser(version, bytes),
48853            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
48854            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
48855            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
48856            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
48857            Self::AUTH_KEY(body) => body.ser(version, bytes),
48858            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
48859            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
48860            Self::AUTOPILOT_VERSION_REQUEST(body) => body.ser(version, bytes),
48861            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
48862            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
48863            Self::BATTERY2(body) => body.ser(version, bytes),
48864            Self::BATTERY_INFO(body) => body.ser(version, bytes),
48865            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
48866            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
48867            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
48868            Self::CAMERA_FEEDBACK(body) => body.ser(version, bytes),
48869            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
48870            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
48871            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
48872            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
48873            Self::CAMERA_STATUS(body) => body.ser(version, bytes),
48874            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
48875            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
48876            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
48877            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
48878            Self::CANFD_FRAME(body) => body.ser(version, bytes),
48879            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
48880            Self::CAN_FRAME(body) => body.ser(version, bytes),
48881            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
48882            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
48883            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
48884            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
48885            Self::COLLISION(body) => body.ser(version, bytes),
48886            Self::COMMAND_ACK(body) => body.ser(version, bytes),
48887            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
48888            Self::COMMAND_INT(body) => body.ser(version, bytes),
48889            Self::COMMAND_LONG(body) => body.ser(version, bytes),
48890            Self::COMPASSMOT_STATUS(body) => body.ser(version, bytes),
48891            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
48892            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
48893            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
48894            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
48895            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(body) => body.ser(version, bytes),
48896            Self::CUBEPILOT_FIRMWARE_UPDATE_START(body) => body.ser(version, bytes),
48897            Self::CUBEPILOT_RAW_RC(body) => body.ser(version, bytes),
48898            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
48899            Self::CURRENT_MODE(body) => body.ser(version, bytes),
48900            Self::DATA16(body) => body.ser(version, bytes),
48901            Self::DATA32(body) => body.ser(version, bytes),
48902            Self::DATA64(body) => body.ser(version, bytes),
48903            Self::DATA96(body) => body.ser(version, bytes),
48904            Self::DATA_STREAM(body) => body.ser(version, bytes),
48905            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
48906            Self::DEBUG(body) => body.ser(version, bytes),
48907            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
48908            Self::DEBUG_VECT(body) => body.ser(version, bytes),
48909            Self::DEEPSTALL(body) => body.ser(version, bytes),
48910            Self::DEVICE_OP_READ(body) => body.ser(version, bytes),
48911            Self::DEVICE_OP_READ_REPLY(body) => body.ser(version, bytes),
48912            Self::DEVICE_OP_WRITE(body) => body.ser(version, bytes),
48913            Self::DEVICE_OP_WRITE_REPLY(body) => body.ser(version, bytes),
48914            Self::DIGICAM_CONFIGURE(body) => body.ser(version, bytes),
48915            Self::DIGICAM_CONTROL(body) => body.ser(version, bytes),
48916            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
48917            Self::EFI_STATUS(body) => body.ser(version, bytes),
48918            Self::EKF_STATUS_REPORT(body) => body.ser(version, bytes),
48919            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
48920            Self::ESC_INFO(body) => body.ser(version, bytes),
48921            Self::ESC_STATUS(body) => body.ser(version, bytes),
48922            Self::ESC_TELEMETRY_13_TO_16(body) => body.ser(version, bytes),
48923            Self::ESC_TELEMETRY_17_TO_20(body) => body.ser(version, bytes),
48924            Self::ESC_TELEMETRY_1_TO_4(body) => body.ser(version, bytes),
48925            Self::ESC_TELEMETRY_21_TO_24(body) => body.ser(version, bytes),
48926            Self::ESC_TELEMETRY_25_TO_28(body) => body.ser(version, bytes),
48927            Self::ESC_TELEMETRY_29_TO_32(body) => body.ser(version, bytes),
48928            Self::ESC_TELEMETRY_5_TO_8(body) => body.ser(version, bytes),
48929            Self::ESC_TELEMETRY_9_TO_12(body) => body.ser(version, bytes),
48930            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
48931            Self::EVENT(body) => body.ser(version, bytes),
48932            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
48933            Self::FENCE_FETCH_POINT(body) => body.ser(version, bytes),
48934            Self::FENCE_POINT(body) => body.ser(version, bytes),
48935            Self::FENCE_STATUS(body) => body.ser(version, bytes),
48936            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
48937            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
48938            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
48939            Self::FUEL_STATUS(body) => body.ser(version, bytes),
48940            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
48941            Self::GIMBAL_CONTROL(body) => body.ser(version, bytes),
48942            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
48943            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
48944            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
48945            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
48946            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
48947            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
48948            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
48949            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
48950            Self::GIMBAL_REPORT(body) => body.ser(version, bytes),
48951            Self::GIMBAL_TORQUE_CMD_REPORT(body) => body.ser(version, bytes),
48952            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
48953            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
48954            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
48955            Self::GOPRO_GET_REQUEST(body) => body.ser(version, bytes),
48956            Self::GOPRO_GET_RESPONSE(body) => body.ser(version, bytes),
48957            Self::GOPRO_HEARTBEAT(body) => body.ser(version, bytes),
48958            Self::GOPRO_SET_REQUEST(body) => body.ser(version, bytes),
48959            Self::GOPRO_SET_RESPONSE(body) => body.ser(version, bytes),
48960            Self::GPS2_RAW(body) => body.ser(version, bytes),
48961            Self::GPS2_RTK(body) => body.ser(version, bytes),
48962            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
48963            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
48964            Self::GPS_INPUT(body) => body.ser(version, bytes),
48965            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
48966            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
48967            Self::GPS_RTK(body) => body.ser(version, bytes),
48968            Self::GPS_STATUS(body) => body.ser(version, bytes),
48969            Self::HEARTBEAT(body) => body.ser(version, bytes),
48970            Self::HERELINK_TELEM(body) => body.ser(version, bytes),
48971            Self::HERELINK_VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
48972            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
48973            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
48974            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
48975            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
48976            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
48977            Self::HIL_GPS(body) => body.ser(version, bytes),
48978            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
48979            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
48980            Self::HIL_SENSOR(body) => body.ser(version, bytes),
48981            Self::HIL_STATE(body) => body.ser(version, bytes),
48982            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
48983            Self::HOME_POSITION(body) => body.ser(version, bytes),
48984            Self::HWSTATUS(body) => body.ser(version, bytes),
48985            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
48986            Self::ICAROUS_HEARTBEAT(body) => body.ser(version, bytes),
48987            Self::ICAROUS_KINEMATIC_BANDS(body) => body.ser(version, bytes),
48988            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
48989            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
48990            Self::LANDING_TARGET(body) => body.ser(version, bytes),
48991            Self::LED_CONTROL(body) => body.ser(version, bytes),
48992            Self::LIMITS_STATUS(body) => body.ser(version, bytes),
48993            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
48994            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
48995            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
48996            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
48997            Self::LOGGING_ACK(body) => body.ser(version, bytes),
48998            Self::LOGGING_DATA(body) => body.ser(version, bytes),
48999            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
49000            Self::LOG_DATA(body) => body.ser(version, bytes),
49001            Self::LOG_ENTRY(body) => body.ser(version, bytes),
49002            Self::LOG_ERASE(body) => body.ser(version, bytes),
49003            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
49004            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
49005            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
49006            Self::LOWEHEISER_GOV_EFI(body) => body.ser(version, bytes),
49007            Self::MAG_CAL_PROGRESS(body) => body.ser(version, bytes),
49008            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
49009            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
49010            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
49011            Self::MCU_STATUS(body) => body.ser(version, bytes),
49012            Self::MEMINFO(body) => body.ser(version, bytes),
49013            Self::MEMORY_VECT(body) => body.ser(version, bytes),
49014            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
49015            Self::MISSION_ACK(body) => body.ser(version, bytes),
49016            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
49017            Self::MISSION_COUNT(body) => body.ser(version, bytes),
49018            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
49019            Self::MISSION_ITEM(body) => body.ser(version, bytes),
49020            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
49021            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
49022            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
49023            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
49024            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
49025            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
49026            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
49027            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
49028            Self::MOUNT_CONFIGURE(body) => body.ser(version, bytes),
49029            Self::MOUNT_CONTROL(body) => body.ser(version, bytes),
49030            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
49031            Self::MOUNT_STATUS(body) => body.ser(version, bytes),
49032            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
49033            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
49034            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
49035            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
49036            Self::OBSTACLE_DISTANCE_3D(body) => body.ser(version, bytes),
49037            Self::ODOMETRY(body) => body.ser(version, bytes),
49038            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
49039            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
49040            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
49041            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
49042            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
49043            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
49044            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
49045            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
49046            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
49047            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
49048            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
49049            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
49050            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
49051            Self::OSD_PARAM_CONFIG(body) => body.ser(version, bytes),
49052            Self::OSD_PARAM_CONFIG_REPLY(body) => body.ser(version, bytes),
49053            Self::OSD_PARAM_SHOW_CONFIG(body) => body.ser(version, bytes),
49054            Self::OSD_PARAM_SHOW_CONFIG_REPLY(body) => body.ser(version, bytes),
49055            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
49056            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
49057            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
49058            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
49059            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
49060            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
49061            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
49062            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
49063            Self::PARAM_SET(body) => body.ser(version, bytes),
49064            Self::PARAM_VALUE(body) => body.ser(version, bytes),
49065            Self::PID_TUNING(body) => body.ser(version, bytes),
49066            Self::PING(body) => body.ser(version, bytes),
49067            Self::PLAY_TUNE(body) => body.ser(version, bytes),
49068            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
49069            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
49070            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
49071            Self::POWER_STATUS(body) => body.ser(version, bytes),
49072            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
49073            Self::RADIO(body) => body.ser(version, bytes),
49074            Self::RADIO_STATUS(body) => body.ser(version, bytes),
49075            Self::RALLY_FETCH_POINT(body) => body.ser(version, bytes),
49076            Self::RALLY_POINT(body) => body.ser(version, bytes),
49077            Self::RANGEFINDER(body) => body.ser(version, bytes),
49078            Self::RAW_IMU(body) => body.ser(version, bytes),
49079            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
49080            Self::RAW_RPM(body) => body.ser(version, bytes),
49081            Self::RC_CHANNELS(body) => body.ser(version, bytes),
49082            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
49083            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
49084            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
49085            Self::REMOTE_LOG_BLOCK_STATUS(body) => body.ser(version, bytes),
49086            Self::REMOTE_LOG_DATA_BLOCK(body) => body.ser(version, bytes),
49087            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
49088            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
49089            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
49090            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
49091            Self::RPM(body) => body.ser(version, bytes),
49092            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
49093            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
49094            Self::SCALED_IMU(body) => body.ser(version, bytes),
49095            Self::SCALED_IMU2(body) => body.ser(version, bytes),
49096            Self::SCALED_IMU3(body) => body.ser(version, bytes),
49097            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
49098            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
49099            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
49100            Self::SECURE_COMMAND(body) => body.ser(version, bytes),
49101            Self::SECURE_COMMAND_REPLY(body) => body.ser(version, bytes),
49102            Self::SENSOR_OFFSETS(body) => body.ser(version, bytes),
49103            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
49104            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
49105            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
49106            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
49107            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
49108            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
49109            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
49110            Self::SET_MAG_OFFSETS(body) => body.ser(version, bytes),
49111            Self::SET_MODE(body) => body.ser(version, bytes),
49112            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
49113            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
49114            Self::SIMSTATE(body) => body.ser(version, bytes),
49115            Self::SIM_STATE(body) => body.ser(version, bytes),
49116            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
49117            Self::STATUSTEXT(body) => body.ser(version, bytes),
49118            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
49119            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
49120            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
49121            Self::SYS_STATUS(body) => body.ser(version, bytes),
49122            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
49123            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
49124            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
49125            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
49126            Self::TIMESYNC(body) => body.ser(version, bytes),
49127            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
49128            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
49129            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
49130            Self::TUNNEL(body) => body.ser(version, bytes),
49131            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
49132            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
49133            Self::UAVIONIX_ADSB_GET(body) => body.ser(version, bytes),
49134            Self::UAVIONIX_ADSB_OUT_CFG(body) => body.ser(version, bytes),
49135            Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(body) => body.ser(version, bytes),
49136            Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(body) => body.ser(version, bytes),
49137            Self::UAVIONIX_ADSB_OUT_CONTROL(body) => body.ser(version, bytes),
49138            Self::UAVIONIX_ADSB_OUT_DYNAMIC(body) => body.ser(version, bytes),
49139            Self::UAVIONIX_ADSB_OUT_STATUS(body) => body.ser(version, bytes),
49140            Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(body) => body.ser(version, bytes),
49141            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
49142            Self::V2_EXTENSION(body) => body.ser(version, bytes),
49143            Self::VFR_HUD(body) => body.ser(version, bytes),
49144            Self::VIBRATION(body) => body.ser(version, bytes),
49145            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
49146            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
49147            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
49148            Self::VISION_POSITION_DELTA(body) => body.ser(version, bytes),
49149            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
49150            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
49151            Self::WATER_DEPTH(body) => body.ser(version, bytes),
49152            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
49153            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
49154            Self::WINCH_STATUS(body) => body.ser(version, bytes),
49155            Self::WIND(body) => body.ser(version, bytes),
49156            Self::WIND_COV(body) => body.ser(version, bytes),
49157        }
49158    }
49159    fn extra_crc(id: u32) -> u8 {
49160        match id {
49161            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
49162            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
49163            ADAP_TUNING_DATA::ID => ADAP_TUNING_DATA::EXTRA_CRC,
49164            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
49165            AHRS_DATA::ID => AHRS_DATA::EXTRA_CRC,
49166            AHRS2_DATA::ID => AHRS2_DATA::EXTRA_CRC,
49167            AHRS3_DATA::ID => AHRS3_DATA::EXTRA_CRC,
49168            AIRLINK_AUTH_DATA::ID => AIRLINK_AUTH_DATA::EXTRA_CRC,
49169            AIRLINK_AUTH_RESPONSE_DATA::ID => AIRLINK_AUTH_RESPONSE_DATA::EXTRA_CRC,
49170            AIRSPEED_AUTOCAL_DATA::ID => AIRSPEED_AUTOCAL_DATA::EXTRA_CRC,
49171            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
49172            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
49173            AOA_SSA_DATA::ID => AOA_SSA_DATA::EXTRA_CRC,
49174            AP_ADC_DATA::ID => AP_ADC_DATA::EXTRA_CRC,
49175            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
49176            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
49177            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
49178            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
49179            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
49180            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
49181            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
49182                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
49183            }
49184            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
49185            AUTOPILOT_VERSION_REQUEST_DATA::ID => AUTOPILOT_VERSION_REQUEST_DATA::EXTRA_CRC,
49186            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
49187            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
49188            BATTERY2_DATA::ID => BATTERY2_DATA::EXTRA_CRC,
49189            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
49190            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
49191            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
49192            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
49193            CAMERA_FEEDBACK_DATA::ID => CAMERA_FEEDBACK_DATA::EXTRA_CRC,
49194            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
49195            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
49196            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
49197            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
49198            CAMERA_STATUS_DATA::ID => CAMERA_STATUS_DATA::EXTRA_CRC,
49199            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
49200            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
49201            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
49202            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
49203            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
49204            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
49205            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
49206            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
49207            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
49208            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
49209            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
49210            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
49211            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
49212            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
49213            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
49214            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
49215            COMPASSMOT_STATUS_DATA::ID => COMPASSMOT_STATUS_DATA::EXTRA_CRC,
49216            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
49217            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
49218            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
49219            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
49220            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => {
49221                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::EXTRA_CRC
49222            }
49223            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
49224                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::EXTRA_CRC
49225            }
49226            CUBEPILOT_RAW_RC_DATA::ID => CUBEPILOT_RAW_RC_DATA::EXTRA_CRC,
49227            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
49228            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
49229            DATA16_DATA::ID => DATA16_DATA::EXTRA_CRC,
49230            DATA32_DATA::ID => DATA32_DATA::EXTRA_CRC,
49231            DATA64_DATA::ID => DATA64_DATA::EXTRA_CRC,
49232            DATA96_DATA::ID => DATA96_DATA::EXTRA_CRC,
49233            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
49234            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
49235            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
49236            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
49237            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
49238            DEEPSTALL_DATA::ID => DEEPSTALL_DATA::EXTRA_CRC,
49239            DEVICE_OP_READ_DATA::ID => DEVICE_OP_READ_DATA::EXTRA_CRC,
49240            DEVICE_OP_READ_REPLY_DATA::ID => DEVICE_OP_READ_REPLY_DATA::EXTRA_CRC,
49241            DEVICE_OP_WRITE_DATA::ID => DEVICE_OP_WRITE_DATA::EXTRA_CRC,
49242            DEVICE_OP_WRITE_REPLY_DATA::ID => DEVICE_OP_WRITE_REPLY_DATA::EXTRA_CRC,
49243            DIGICAM_CONFIGURE_DATA::ID => DIGICAM_CONFIGURE_DATA::EXTRA_CRC,
49244            DIGICAM_CONTROL_DATA::ID => DIGICAM_CONTROL_DATA::EXTRA_CRC,
49245            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
49246            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
49247            EKF_STATUS_REPORT_DATA::ID => EKF_STATUS_REPORT_DATA::EXTRA_CRC,
49248            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
49249            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
49250            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
49251            ESC_TELEMETRY_13_TO_16_DATA::ID => ESC_TELEMETRY_13_TO_16_DATA::EXTRA_CRC,
49252            ESC_TELEMETRY_17_TO_20_DATA::ID => ESC_TELEMETRY_17_TO_20_DATA::EXTRA_CRC,
49253            ESC_TELEMETRY_1_TO_4_DATA::ID => ESC_TELEMETRY_1_TO_4_DATA::EXTRA_CRC,
49254            ESC_TELEMETRY_21_TO_24_DATA::ID => ESC_TELEMETRY_21_TO_24_DATA::EXTRA_CRC,
49255            ESC_TELEMETRY_25_TO_28_DATA::ID => ESC_TELEMETRY_25_TO_28_DATA::EXTRA_CRC,
49256            ESC_TELEMETRY_29_TO_32_DATA::ID => ESC_TELEMETRY_29_TO_32_DATA::EXTRA_CRC,
49257            ESC_TELEMETRY_5_TO_8_DATA::ID => ESC_TELEMETRY_5_TO_8_DATA::EXTRA_CRC,
49258            ESC_TELEMETRY_9_TO_12_DATA::ID => ESC_TELEMETRY_9_TO_12_DATA::EXTRA_CRC,
49259            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
49260            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
49261            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
49262            FENCE_FETCH_POINT_DATA::ID => FENCE_FETCH_POINT_DATA::EXTRA_CRC,
49263            FENCE_POINT_DATA::ID => FENCE_POINT_DATA::EXTRA_CRC,
49264            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
49265            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
49266            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
49267            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
49268            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
49269            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
49270            GIMBAL_CONTROL_DATA::ID => GIMBAL_CONTROL_DATA::EXTRA_CRC,
49271            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
49272            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
49273            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
49274            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
49275            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
49276            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
49277                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
49278            }
49279            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
49280            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
49281            GIMBAL_REPORT_DATA::ID => GIMBAL_REPORT_DATA::EXTRA_CRC,
49282            GIMBAL_TORQUE_CMD_REPORT_DATA::ID => GIMBAL_TORQUE_CMD_REPORT_DATA::EXTRA_CRC,
49283            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
49284            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
49285            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
49286                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
49287            }
49288            GOPRO_GET_REQUEST_DATA::ID => GOPRO_GET_REQUEST_DATA::EXTRA_CRC,
49289            GOPRO_GET_RESPONSE_DATA::ID => GOPRO_GET_RESPONSE_DATA::EXTRA_CRC,
49290            GOPRO_HEARTBEAT_DATA::ID => GOPRO_HEARTBEAT_DATA::EXTRA_CRC,
49291            GOPRO_SET_REQUEST_DATA::ID => GOPRO_SET_REQUEST_DATA::EXTRA_CRC,
49292            GOPRO_SET_RESPONSE_DATA::ID => GOPRO_SET_RESPONSE_DATA::EXTRA_CRC,
49293            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
49294            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
49295            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
49296            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
49297            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
49298            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
49299            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
49300            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
49301            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
49302            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
49303            HERELINK_TELEM_DATA::ID => HERELINK_TELEM_DATA::EXTRA_CRC,
49304            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
49305                HERELINK_VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC
49306            }
49307            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
49308            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
49309            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
49310            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
49311            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
49312            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
49313            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
49314            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
49315            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
49316            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
49317            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
49318            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
49319            HWSTATUS_DATA::ID => HWSTATUS_DATA::EXTRA_CRC,
49320            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
49321            ICAROUS_HEARTBEAT_DATA::ID => ICAROUS_HEARTBEAT_DATA::EXTRA_CRC,
49322            ICAROUS_KINEMATIC_BANDS_DATA::ID => ICAROUS_KINEMATIC_BANDS_DATA::EXTRA_CRC,
49323            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
49324            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
49325            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
49326            LED_CONTROL_DATA::ID => LED_CONTROL_DATA::EXTRA_CRC,
49327            LIMITS_STATUS_DATA::ID => LIMITS_STATUS_DATA::EXTRA_CRC,
49328            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
49329            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
49330            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
49331            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
49332                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
49333            }
49334            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
49335            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
49336            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
49337            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
49338            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
49339            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
49340            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
49341            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
49342            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
49343            LOWEHEISER_GOV_EFI_DATA::ID => LOWEHEISER_GOV_EFI_DATA::EXTRA_CRC,
49344            MAG_CAL_PROGRESS_DATA::ID => MAG_CAL_PROGRESS_DATA::EXTRA_CRC,
49345            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
49346            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
49347            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
49348            MCU_STATUS_DATA::ID => MCU_STATUS_DATA::EXTRA_CRC,
49349            MEMINFO_DATA::ID => MEMINFO_DATA::EXTRA_CRC,
49350            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
49351            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
49352            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
49353            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
49354            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
49355            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
49356            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
49357            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
49358            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
49359            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
49360            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
49361            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
49362            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
49363            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
49364            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
49365            MOUNT_CONFIGURE_DATA::ID => MOUNT_CONFIGURE_DATA::EXTRA_CRC,
49366            MOUNT_CONTROL_DATA::ID => MOUNT_CONTROL_DATA::EXTRA_CRC,
49367            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
49368            MOUNT_STATUS_DATA::ID => MOUNT_STATUS_DATA::EXTRA_CRC,
49369            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
49370            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
49371            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
49372            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
49373            OBSTACLE_DISTANCE_3D_DATA::ID => OBSTACLE_DISTANCE_3D_DATA::EXTRA_CRC,
49374            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
49375            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
49376            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
49377            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
49378            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
49379            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
49380            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
49381            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
49382            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
49383            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
49384            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
49385            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
49386            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
49387            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
49388            OSD_PARAM_CONFIG_DATA::ID => OSD_PARAM_CONFIG_DATA::EXTRA_CRC,
49389            OSD_PARAM_CONFIG_REPLY_DATA::ID => OSD_PARAM_CONFIG_REPLY_DATA::EXTRA_CRC,
49390            OSD_PARAM_SHOW_CONFIG_DATA::ID => OSD_PARAM_SHOW_CONFIG_DATA::EXTRA_CRC,
49391            OSD_PARAM_SHOW_CONFIG_REPLY_DATA::ID => OSD_PARAM_SHOW_CONFIG_REPLY_DATA::EXTRA_CRC,
49392            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
49393            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
49394            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
49395            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
49396            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
49397            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
49398            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
49399            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
49400            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
49401            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
49402            PID_TUNING_DATA::ID => PID_TUNING_DATA::EXTRA_CRC,
49403            PING_DATA::ID => PING_DATA::EXTRA_CRC,
49404            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
49405            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
49406            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
49407            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
49408            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
49409            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
49410            RADIO_DATA::ID => RADIO_DATA::EXTRA_CRC,
49411            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
49412            RALLY_FETCH_POINT_DATA::ID => RALLY_FETCH_POINT_DATA::EXTRA_CRC,
49413            RALLY_POINT_DATA::ID => RALLY_POINT_DATA::EXTRA_CRC,
49414            RANGEFINDER_DATA::ID => RANGEFINDER_DATA::EXTRA_CRC,
49415            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
49416            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
49417            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
49418            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
49419            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
49420            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
49421            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
49422            REMOTE_LOG_BLOCK_STATUS_DATA::ID => REMOTE_LOG_BLOCK_STATUS_DATA::EXTRA_CRC,
49423            REMOTE_LOG_DATA_BLOCK_DATA::ID => REMOTE_LOG_DATA_BLOCK_DATA::EXTRA_CRC,
49424            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
49425            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
49426            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
49427            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
49428            RPM_DATA::ID => RPM_DATA::EXTRA_CRC,
49429            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
49430            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
49431            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
49432            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
49433            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
49434            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
49435            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
49436            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
49437            SECURE_COMMAND_DATA::ID => SECURE_COMMAND_DATA::EXTRA_CRC,
49438            SECURE_COMMAND_REPLY_DATA::ID => SECURE_COMMAND_REPLY_DATA::EXTRA_CRC,
49439            SENSOR_OFFSETS_DATA::ID => SENSOR_OFFSETS_DATA::EXTRA_CRC,
49440            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
49441            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
49442            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
49443            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
49444            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
49445            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
49446            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
49447            SET_MAG_OFFSETS_DATA::ID => SET_MAG_OFFSETS_DATA::EXTRA_CRC,
49448            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
49449            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
49450                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
49451            }
49452            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
49453            SIMSTATE_DATA::ID => SIMSTATE_DATA::EXTRA_CRC,
49454            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
49455            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
49456            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
49457            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
49458            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
49459            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
49460            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
49461            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
49462            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
49463            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
49464            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
49465            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
49466            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
49467            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
49468                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
49469            }
49470            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
49471                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
49472            }
49473            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
49474            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
49475            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
49476            UAVIONIX_ADSB_GET_DATA::ID => UAVIONIX_ADSB_GET_DATA::EXTRA_CRC,
49477            UAVIONIX_ADSB_OUT_CFG_DATA::ID => UAVIONIX_ADSB_OUT_CFG_DATA::EXTRA_CRC,
49478            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => {
49479                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::EXTRA_CRC
49480            }
49481            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
49482                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::EXTRA_CRC
49483            }
49484            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => UAVIONIX_ADSB_OUT_CONTROL_DATA::EXTRA_CRC,
49485            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::EXTRA_CRC,
49486            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => UAVIONIX_ADSB_OUT_STATUS_DATA::EXTRA_CRC,
49487            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
49488                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::EXTRA_CRC
49489            }
49490            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
49491            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
49492            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
49493            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
49494            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
49495            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
49496            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
49497            VISION_POSITION_DELTA_DATA::ID => VISION_POSITION_DELTA_DATA::EXTRA_CRC,
49498            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
49499            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
49500            WATER_DEPTH_DATA::ID => WATER_DEPTH_DATA::EXTRA_CRC,
49501            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
49502            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
49503            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
49504            WIND_DATA::ID => WIND_DATA::EXTRA_CRC,
49505            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
49506            _ => 0,
49507        }
49508    }
49509    fn target_system_id(&self) -> Option<u8> {
49510        match self {
49511            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
49512            Self::AUTOPILOT_VERSION_REQUEST(inner) => Some(inner.target_system),
49513            Self::CAMERA_FEEDBACK(inner) => Some(inner.target_system),
49514            Self::CAMERA_STATUS(inner) => Some(inner.target_system),
49515            Self::CANFD_FRAME(inner) => Some(inner.target_system),
49516            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
49517            Self::CAN_FRAME(inner) => Some(inner.target_system),
49518            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
49519            Self::COMMAND_ACK(inner) => Some(inner.target_system),
49520            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
49521            Self::COMMAND_INT(inner) => Some(inner.target_system),
49522            Self::COMMAND_LONG(inner) => Some(inner.target_system),
49523            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(inner) => Some(inner.target_system),
49524            Self::CUBEPILOT_FIRMWARE_UPDATE_START(inner) => Some(inner.target_system),
49525            Self::DEVICE_OP_READ(inner) => Some(inner.target_system),
49526            Self::DEVICE_OP_WRITE(inner) => Some(inner.target_system),
49527            Self::DIGICAM_CONFIGURE(inner) => Some(inner.target_system),
49528            Self::DIGICAM_CONTROL(inner) => Some(inner.target_system),
49529            Self::FENCE_FETCH_POINT(inner) => Some(inner.target_system),
49530            Self::FENCE_POINT(inner) => Some(inner.target_system),
49531            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
49532            Self::GIMBAL_CONTROL(inner) => Some(inner.target_system),
49533            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
49534            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
49535            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
49536            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
49537            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
49538            Self::GIMBAL_REPORT(inner) => Some(inner.target_system),
49539            Self::GIMBAL_TORQUE_CMD_REPORT(inner) => Some(inner.target_system),
49540            Self::GOPRO_GET_REQUEST(inner) => Some(inner.target_system),
49541            Self::GOPRO_SET_REQUEST(inner) => Some(inner.target_system),
49542            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
49543            Self::LED_CONTROL(inner) => Some(inner.target_system),
49544            Self::LOGGING_ACK(inner) => Some(inner.target_system),
49545            Self::LOGGING_DATA(inner) => Some(inner.target_system),
49546            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
49547            Self::LOG_ERASE(inner) => Some(inner.target_system),
49548            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
49549            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
49550            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
49551            Self::MISSION_ACK(inner) => Some(inner.target_system),
49552            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
49553            Self::MISSION_COUNT(inner) => Some(inner.target_system),
49554            Self::MISSION_ITEM(inner) => Some(inner.target_system),
49555            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
49556            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
49557            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
49558            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
49559            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
49560            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
49561            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
49562            Self::MOUNT_CONFIGURE(inner) => Some(inner.target_system),
49563            Self::MOUNT_CONTROL(inner) => Some(inner.target_system),
49564            Self::MOUNT_STATUS(inner) => Some(inner.target_system),
49565            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
49566            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
49567            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
49568            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
49569            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
49570            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
49571            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
49572            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
49573            Self::OSD_PARAM_CONFIG(inner) => Some(inner.target_system),
49574            Self::OSD_PARAM_SHOW_CONFIG(inner) => Some(inner.target_system),
49575            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
49576            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
49577            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
49578            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
49579            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
49580            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
49581            Self::PARAM_SET(inner) => Some(inner.target_system),
49582            Self::PING(inner) => Some(inner.target_system),
49583            Self::PLAY_TUNE(inner) => Some(inner.target_system),
49584            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
49585            Self::RALLY_FETCH_POINT(inner) => Some(inner.target_system),
49586            Self::RALLY_POINT(inner) => Some(inner.target_system),
49587            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
49588            Self::REMOTE_LOG_BLOCK_STATUS(inner) => Some(inner.target_system),
49589            Self::REMOTE_LOG_DATA_BLOCK(inner) => Some(inner.target_system),
49590            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
49591            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
49592            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
49593            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
49594            Self::SECURE_COMMAND(inner) => Some(inner.target_system),
49595            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
49596            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
49597            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
49598            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
49599            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
49600            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
49601            Self::SET_MAG_OFFSETS(inner) => Some(inner.target_system),
49602            Self::SET_MODE(inner) => Some(inner.target_system),
49603            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
49604            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
49605            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
49606            Self::TIMESYNC(inner) => Some(inner.target_system),
49607            Self::TUNNEL(inner) => Some(inner.target_system),
49608            Self::V2_EXTENSION(inner) => Some(inner.target_system),
49609            _ => None,
49610        }
49611    }
49612    fn target_component_id(&self) -> Option<u8> {
49613        match self {
49614            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
49615            Self::AUTOPILOT_VERSION_REQUEST(inner) => Some(inner.target_component),
49616            Self::CANFD_FRAME(inner) => Some(inner.target_component),
49617            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
49618            Self::CAN_FRAME(inner) => Some(inner.target_component),
49619            Self::COMMAND_ACK(inner) => Some(inner.target_component),
49620            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
49621            Self::COMMAND_INT(inner) => Some(inner.target_component),
49622            Self::COMMAND_LONG(inner) => Some(inner.target_component),
49623            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(inner) => Some(inner.target_component),
49624            Self::CUBEPILOT_FIRMWARE_UPDATE_START(inner) => Some(inner.target_component),
49625            Self::DEVICE_OP_READ(inner) => Some(inner.target_component),
49626            Self::DEVICE_OP_WRITE(inner) => Some(inner.target_component),
49627            Self::DIGICAM_CONFIGURE(inner) => Some(inner.target_component),
49628            Self::DIGICAM_CONTROL(inner) => Some(inner.target_component),
49629            Self::FENCE_FETCH_POINT(inner) => Some(inner.target_component),
49630            Self::FENCE_POINT(inner) => Some(inner.target_component),
49631            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
49632            Self::GIMBAL_CONTROL(inner) => Some(inner.target_component),
49633            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
49634            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
49635            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
49636            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
49637            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
49638            Self::GIMBAL_REPORT(inner) => Some(inner.target_component),
49639            Self::GIMBAL_TORQUE_CMD_REPORT(inner) => Some(inner.target_component),
49640            Self::GOPRO_GET_REQUEST(inner) => Some(inner.target_component),
49641            Self::GOPRO_SET_REQUEST(inner) => Some(inner.target_component),
49642            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
49643            Self::LED_CONTROL(inner) => Some(inner.target_component),
49644            Self::LOGGING_ACK(inner) => Some(inner.target_component),
49645            Self::LOGGING_DATA(inner) => Some(inner.target_component),
49646            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
49647            Self::LOG_ERASE(inner) => Some(inner.target_component),
49648            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
49649            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
49650            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
49651            Self::MISSION_ACK(inner) => Some(inner.target_component),
49652            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
49653            Self::MISSION_COUNT(inner) => Some(inner.target_component),
49654            Self::MISSION_ITEM(inner) => Some(inner.target_component),
49655            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
49656            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
49657            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
49658            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
49659            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
49660            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
49661            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
49662            Self::MOUNT_CONFIGURE(inner) => Some(inner.target_component),
49663            Self::MOUNT_CONTROL(inner) => Some(inner.target_component),
49664            Self::MOUNT_STATUS(inner) => Some(inner.target_component),
49665            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
49666            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
49667            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
49668            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
49669            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
49670            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
49671            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
49672            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
49673            Self::OSD_PARAM_CONFIG(inner) => Some(inner.target_component),
49674            Self::OSD_PARAM_SHOW_CONFIG(inner) => Some(inner.target_component),
49675            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
49676            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
49677            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
49678            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
49679            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
49680            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
49681            Self::PARAM_SET(inner) => Some(inner.target_component),
49682            Self::PING(inner) => Some(inner.target_component),
49683            Self::PLAY_TUNE(inner) => Some(inner.target_component),
49684            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
49685            Self::RALLY_FETCH_POINT(inner) => Some(inner.target_component),
49686            Self::RALLY_POINT(inner) => Some(inner.target_component),
49687            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
49688            Self::REMOTE_LOG_BLOCK_STATUS(inner) => Some(inner.target_component),
49689            Self::REMOTE_LOG_DATA_BLOCK(inner) => Some(inner.target_component),
49690            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
49691            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
49692            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
49693            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
49694            Self::SECURE_COMMAND(inner) => Some(inner.target_component),
49695            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
49696            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
49697            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
49698            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
49699            Self::SET_MAG_OFFSETS(inner) => Some(inner.target_component),
49700            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
49701            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
49702            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
49703            Self::TIMESYNC(inner) => Some(inner.target_component),
49704            Self::TUNNEL(inner) => Some(inner.target_component),
49705            Self::V2_EXTENSION(inner) => Some(inner.target_component),
49706            _ => None,
49707        }
49708    }
49709}